<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Vivek&#039;s blog</title>
	<atom:link href="http://exain.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://exain.wordpress.com</link>
	<description>Howtos, tutorials and other updates</description>
	<lastBuildDate>Fri, 20 Jan 2012 23:49:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='exain.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Vivek&#039;s blog</title>
		<link>http://exain.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://exain.wordpress.com/osd.xml" title="Vivek&#039;s blog" />
	<atom:link rel='hub' href='http://exain.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Wireless on Ubuntu 11.10 and Lenovo Thinkpad E420</title>
		<link>http://exain.wordpress.com/2011/10/16/wireless-on-ubuntu-11-10-and-lenovo-thinkpad-e420/</link>
		<comments>http://exain.wordpress.com/2011/10/16/wireless-on-ubuntu-11-10-and-lenovo-thinkpad-e420/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 06:08:39 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[acer_wmi]]></category>
		<category><![CDATA[e420]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[oneiric ocelot]]></category>
		<category><![CDATA[realtek]]></category>
		<category><![CDATA[rtl8188ce]]></category>
		<category><![CDATA[rtl8192ce]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu 11.10]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=114</guid>
		<description><![CDATA[Unlike 11.04 and earlier, Ubuntu 11.10 runs much better on Lenovo Thinkpad E420. The only glitch is the wifi drivers which don&#8217;t run by default, and it could be corrected easily Using LiveCD or a running system Press Super (Window) key, and open Terminal Type sudo modprobe -r acer_wmi That&#8217;s all. You should be able [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=114&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Unlike 11.04 and earlier, Ubuntu 11.10 runs much better on Lenovo Thinkpad E420. The only glitch is the wifi drivers which don&#8217;t run by default, and it could be corrected easily</p>
<h2>Using LiveCD or a running system</h2>
<ul>
<li>Press Super (Window) key, and open Terminal</li>
<li>Type <strong>sudo modprobe -r acer_wmi</strong></li>
</ul>
<p>That&#8217;s all. You should be able to connect to the wireless till next reboot.</p>
<h2>Making the change permanent</h2>
<p>Edit the file <strong>/etc/modprobe.d/blacklist.conf</strong> and in the end type</p>
<pre>blacklist acer_wmi</pre>
<p>Reboot and you&#8217;re done. If you&#8217;re doing it entirely from the GUI, then editing the file could be done by pressing ALT+F2 (this would open a &#8220;Run&#8221; window) and typing there <strong>gksu gedit /etc/modprobe.d/blacklist.conf</strong></p>
<p><strong>Please note:</strong> This applies to wireless card having rtl8188ce chipset. You can view that by typing <strong>lspci</strong> in a terminal and searching for the entries respective to Network Controller.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=114&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2011/10/16/wireless-on-ubuntu-11-10-and-lenovo-thinkpad-e420/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 11.04 on Lenovo E420</title>
		<link>http://exain.wordpress.com/2011/07/24/ubuntu-11-04-on-lenovo-e420/</link>
		<comments>http://exain.wordpress.com/2011/07/24/ubuntu-11-04-on-lenovo-e420/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 17:25:25 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[dconf-editor]]></category>
		<category><![CDATA[e420]]></category>
		<category><![CDATA[freeze]]></category>
		<category><![CDATA[gnome-do]]></category>
		<category><![CDATA[hang]]></category>
		<category><![CDATA[natty]]></category>
		<category><![CDATA[pae]]></category>
		<category><![CDATA[rtl8188ce]]></category>
		<category><![CDATA[systray-whitelist]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unity]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=107</guid>
		<description><![CDATA[Update: 16 October 2011 &#8211; Ubuntu 11.10 works better. http://wp.me/p9bZ0-1Q I recently got a Lenovo E420 laptop, and I just went ahead and installed Ubuntu 11.04 on it. Few are some of the things that may help those who&#8217;re facing issues with it. I got 4 GB RAM on Core i5. It&#8217;s 64bit processor, so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=107&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Update: 16 October 2011</strong> &#8211; Ubuntu 11.10 works better. http://wp.me/p9bZ0-1Q</p>
<p>I recently got a Lenovo E420 laptop, and I just went ahead and installed Ubuntu 11.04 on it. Few are some of the things that may help those who&#8217;re facing issues with it. I got 4 GB RAM on Core i5. It&#8217;s 64bit processor, so I preferred 64bit Ubuntu instead of 32bit pae kernel.</p>
<h3>Wireless</h3>
<p>The machine has rtl8188ce chipset, and the Realtek drivers available from Realtek&#8217;s website don&#8217;t work well. You just need to blacklist acer_wmi module</p>
<p>Edit /etc/modprobe.d/blacklist.conf and add</p>
<pre>blacklist acer_wmi</pre>
<p>Save and reboot. This won&#8217;t work if you&#8217;ve compiled Realtek drivers and installed them. It&#8217;ll work only in the default install. Here&#8217;s more detailed link -  <a title="Fix wireless on Ubuntu 11.04 Thinkpad Edge E420" href="http://askubuntu.com/questions/53625/wireless-on-thinkpad-edge-e420s">http://askubuntu.com/questions/53625/wireless-on-thinkpad-edge-e420s</a></p>
<h3></h3>
<h3>Random screen lockups</h3>
<p>I am not sure why it occurred &#8211; due to the kernel or due to the compiz settings. I did both. Installed Kernel 2.6.39 from <a title="Ubuntu 2.6.39 kernel for 11.04 Natty" href="http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.39-rc4-natty/">http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.39-rc4-natty/</a></p>
<p>Also, I installed CompizConfig Settings Manager (ccsm) from Ubuntu Software Center, and then disabled this option</p>
<p>General -&gt; OpenGL -&gt; Sync to VBlank (uncheck this)</p>
<p>Reboot. The system may not hang. <a href="http://www.preshweb.co.uk/2011/05/ubuntu-11-04-x-freezing-after-screensaver-active-laptop-lid-closed/">http://www.preshweb.co.uk/2011/05/ubuntu-11-04-x-freezing-after-screensaver-active-laptop-lid-closed/</a></p>
<p><strong>Update 26 July 2011:</strong> There are still instances of system hanging <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  Unable to identify the cause as yet. However, this time the system just hangs with no mouse movement at all. This behavior I experienced in 32bit-pae kernel too and usually happens when system has gone through more than a few standbys. Will diagnose and update further.</p>
<p><strong>Update 2 &#8211; 30 July 2011</strong> : I updated the BIOS to v1.16 (earlier it was 1.10), but it didn&#8217;t do any good. The system still got hung. It is not due to standby also as I disabled the &#8220;Suspend&#8221; option from Power Management section and rebooted the computer and used it for around 3 hours after which I got a Kernel Panic. Realtek has put a new version of their <a title="Linux Drivers for Realtek rtl8188ce (rtl8192ce)" href="http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&amp;PNid=21&amp;PFid=48&amp;Level=5&amp;Conn=4&amp;ProdID=272&amp;DownTypeID=3&amp;GetDown=false&amp;Downloads=true#RTL8188CE">drivers for rtl8188ce chipset</a> &#8211; I&#8217;ve just installed those and rebooted and it seems to be working. Will update later if it has cured the hanging problem.</p>
<p><strong>Update 3 &#8211; 31 July 2011</strong> : After installing the realtek rtl8188ce drivers as mentioned in the post above, I&#8217;ve not rebooted the machine since more than 24 hours. Had suspended it more than a few times, and did various experiments which earlier eventually led to a freeze. But I&#8217;m happy to report that till now all has been good and it has not yet hung. I&#8217;ll keep working on it for next few days and see if there has been a proper resolution.</p>
<h3></h3>
<h3>Indicator icons for unsupported apps</h3>
<p>I installed gnome-do and I was unable to see the indicator icon for that. Installed <strong>dconf-editor</strong> from Ubuntu Software Center.</p>
<p>Got the name of the application from .xsession-errors file (TrayChild). Opened dconf-editor and added &#8216;Do&#8217; in there. Logged out and logged back in and all is well.</p>
<p><a title="Identify names for systray-whitelist Ubuntu 11.04 unity" href="http://askubuntu.com/questions/36898/how-can-i-see-a-list-of-all-the-systray-icons-that-are-not-whitelisted/39750#39750">http://askubuntu.com/questions/36898/how-can-i-see-a-list-of-all-the-systray-icons-that-are-not-whitelisted/39750#39750</a></p>
<p>Don&#8217;t set systray-whitelist to &#8220;all&#8221; as that may lead to the icons in indicator being unclickable.</p>
<p>To be honest, it was horrendous to use Ubuntu 11.04 due to severe productivity issues for the first week. I installed 32bit pae kernel so that the 4GB RAM could be supported. But I couldn&#8217;t upgrade it to 2.6.39 as no pae kernel was available for 2.6.39. I rather installed 64bit Ubuntu, and updated it immediately and rest did what I mentioned above. No more hangs till now, and life has been happy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=107&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2011/07/24/ubuntu-11-04-on-lenovo-e420/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Nokia E6 Symbian Anna IMAP with push mail</title>
		<link>http://exain.wordpress.com/2011/06/27/nokia-e6-symbian-anna-imap-with-push-mail/</link>
		<comments>http://exain.wordpress.com/2011/06/27/nokia-e6-symbian-anna-imap-with-push-mail/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 11:53:36 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[e6]]></category>
		<category><![CDATA[e6-00]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[imap idle]]></category>
		<category><![CDATA[mfe]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[push mail]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[symbian anna]]></category>
		<category><![CDATA[z-push]]></category>
		<category><![CDATA[zarafa]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=103</guid>
		<description><![CDATA[Nokia Symbian based phones have a terrible IMAP support. If you have IMAP server of your own, you only have two options Use &#8220;Nokia Messaging&#8221; which means you receive your emails via Nokia servers (similar to blackberry) and it&#8217;d not be your phone but nokia servers which would connect to your IMAP server and push [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=103&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Nokia Symbian based phones have a terrible IMAP support. If you have IMAP server of your own, you only have two options</p>
<ul>
<li>Use &#8220;Nokia Messaging&#8221; which means you receive your emails via Nokia servers (similar to blackberry) and it&#8217;d not be your phone but nokia servers which would connect to your IMAP server and push mails to your phone. This works better, but then you&#8217;re giving your details to Nokia, and could be a privacy issue for some.</li>
<li>Use the in-built IMAP client. This would mean you don&#8217;t have a &#8216;push&#8217; email, but a check interval of 5 minutes. Not awesome.</li>
</ul>
<p>Following is one more way to set to use IMAP via the Nokia Mail for Exchange client, and you don&#8217;t need to have any Microsoft Exchange setup.</p>
<p>&nbsp;</p>
<h3 id="Concept">Concept</h3>
<ol type="1">
<li>You need to be running an IMAP server.</li>
<li>There&#8217;s an open source PHP based software called &#8220;z-push&#8221; which allows activesync connectivity and has IMAP backend, which means you can use it to &#8216;sync&#8217; your phones using the Nokia Mail for Exchange client.</li>
<li>You need Apache web server with php5 and php5-imap support where <strong>z-push</strong> would be setup.</li>
<li>You download and configure z-push.</li>
<li>You configure your phone settings, and then use Nokia Mfe client to connect to your IMAP server and thus have &#8220;push&#8221; functionality.</li>
</ol>
<p>&nbsp;</p>
<h3 id="Assumptions">Assumptions</h3>
<ol type="1">
<li>An IMAP server is running with SSL support with self-signed certificates (I used dovecot), which has usernames as &#8216;<a href="mailto:user@domain.com">user@domain.com</a>&#8216; format.</li>
<li>You have Apache with PHP5 and php-imap support. On ubuntu/debian you can install it using <tt>apt-get install php5-imap</tt>.</li>
<li>Nokia Mail For Exchange supports only a single account on a phone. So if you have multiple email accounts to be synced, bad luck.</li>
<li>It was tested on a Nokia E6 running Symbian Anna. Your setup may vary or could be different.</li>
</ol>
<p>&nbsp;</p>
<h3 id="Server_side_setup">Server side setup</h3>
<ol type="1">
<li>Download z-push from Source Forge <a href="http://z-push.sf.net/">http://z-push.sf.net</a> ; I used version z-push-1.5.4RC-705.tar.gz.</li>
<li>Extract it in a suitable location, for example, <tt>/var/www/z-push</tt></li>
<li>You can refer to the <tt>INSTALL</tt> document too for more information inside the z-push extracted files.</li>
<li>Make the &#8216;state&#8217; directory web server user writable. So do <tt>chown www-data.www-data state</tt> or <tt>chmod 777 state</tt>.</li>
<li>Configure z-push. We will modify the following
<pre>$BACKEND_PROVIDER = "BackendIMAP";

// ************************
//  BackendIMAP settings
// ************************

define('IMAP_SERVER', 'localhost');
define('IMAP_PORT', 993);
define('IMAP_OPTIONS', '/ssl/novalidate-cert');
define('IMAP_DEFAULTFROM', 'domain');
define('IMAP_SENTFOLDER', 'Sent');
define('IMAP_USE_IMAPMAIL', false);</pre>
</li>
<li>So that the &#8220;Sender Name&#8221; when sending out email works well, there&#8217;s a <tt>IMAP_DEFAULTFROM</tt> setting, which didn&#8217;t work too well in my case, so I modified the backend file to display the &#8220;Sender&#8217;s Name&#8221; correctly in the format <tt>Firstname Lastname &lt;user@domain.com&gt;</tt>. The following changes were done in <tt>backend/imap.php</tt>
<pre># Added the following lines in the section below
# $v = "$this-&gt;_domain &lt;$this-&gt;_username&gt;";
# $envelopefrom = "-f$this-&gt;_username";

            if ($k == "from") {
                if (trim($v)) {
                    $changedfrom = true;
                    $v = "$this-&gt;_domain &lt;$this-&gt;_username&gt;";
                    $envelopefrom = "-f$this-&gt;_username";
                } elseif (! trim($v) &amp;&amp; IMAP_DEFAULTFROM) {</pre>
</li>
<li>In Apache configuration, I have SSL setup. So in the configuration file for the SSL, I specified an alias as under
<pre>        Alias /Microsoft-Server-ActiveSync "/var/www/z-push/index.php"</pre>
</li>
<li>Restart Apache and your z-push is ready.</li>
</ol>
<p>&nbsp;</p>
<h3 id="Client_side.2BAC8-phone_setup">Client side/phone setup</h3>
<ol type="1">
<li>Now that the server side setup is ready, we&#8217;ll configure the phone.</li>
<li>You can enter the settings as per the requirements while configuring the Mail For Exchange client.</li>
<li>The &#8220;domain&#8221; would be your full name (as you wish to display when you send someone an email).</li>
<li>That&#8217;s all. Sync it and you&#8217;re ready to go!</li>
</ol>
<p>&nbsp;</p>
<h2 id="Troubleshooting">Troubleshooting</h2>
<ol type="1">
<li>To enable debug logs, create a file <tt>debug.txt</tt> in the z-push directory and assign it web server user writeable privileges. For example:
<pre>cd /var/www/z-push
touch debug.txt
chown www-data.www-data debug.txt # or; chmod 777 debug.txt</pre>
</li>
<li>You may want to experiment with the <tt>IMAP_OPTIONS</tt> by referring to <a href="http://php.net/imap_open">http://php.net/imap_open</a></li>
<li>Your &#8216;Sent&#8217; items folder could be different. You may want to keep it blank (the default).</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=103&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2011/06/27/nokia-e6-symbian-anna-imap-with-push-mail/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Making a WiFi Hotspot / Access Point using Linux &amp; wifi lan card/USB adapter</title>
		<link>http://exain.wordpress.com/2011/03/31/making-a-wifi-hotspot-access-point-using-linux-wifi-lan-cardusb-adapter/</link>
		<comments>http://exain.wordpress.com/2011/03/31/making-a-wifi-hotspot-access-point-using-linux-wifi-lan-cardusb-adapter/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 06:49:08 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[access point]]></category>
		<category><![CDATA[ap]]></category>
		<category><![CDATA[ath5k]]></category>
		<category><![CDATA[hostapd]]></category>
		<category><![CDATA[hotspot]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[rt2800usb]]></category>
		<category><![CDATA[rt2870sta]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wusb54gc]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=97</guid>
		<description><![CDATA[If you have a wifi LAN card / USB adapter, then you can use it as an access point so that other machines can connect to the internet via your machine using Wifi. The process is fairly simple, but requires you to have a compatible set of drivers which allow a wifi lan card to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=97&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If  you have a wifi LAN card / USB adapter, then you can use it as an  access point so that other machines can connect to the internet via your machine using Wifi. The process is  fairly simple, but requires you to have a compatible set of drivers  which allow a wifi lan card to come into &#8220;Master&#8221; mode.</p>
<p>It didn&#8217;t work well for</p>
<ul>
<li>Linksys  WUSB54GC v3 USB adapter. Till Ubuntu 10.04, there were no good drivers for  use with hostapd (supporting mac80211 / nl80211). In Ubuntu 10.10,  though the drivers were working, but the connection was highly unstable &#8211;  in fact unusable. The drivers that I tried were rt2800usb (which  allowed the adapter to come into Master mode), and rt2870sta which  didn&#8217;t allow the adapter to come into &#8220;Master&#8221; mode. It always remained  &#8220;Auto&#8221; or &#8220;Managed&#8221; (checked via iwconfig). Need to test in 11.04 when  it arrives.</li>
</ul>
<p>What worked pretty well</p>
<ul>
<li>02:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01), using <tt>ath5k</tt> drivers. hostapd didn&#8217;t complain at all and all was smooth. This was in Ubuntu 10.04.</li>
</ul>
<h3 id="Concept">Concept</h3>
<ol type="1">
<li>There&#8217;s an  application called hostapd which allows converting a wifi adapter into  an access point and provide privileges such as WPA authentication and  ssid name definition etc. I used it and it worked well.</li>
<li>When  a client connects to the access point, apart from authentication it&#8217;ll  require IP addresses to be assigned. For that a DHCP server is used.</li>
<li>You  need to have 2 interfaces, one which accesses the net (e.g. eth0), and  other which provides the access point services (e.g. wlan0).</li>
<li>You  start the wlan interface, assign it an IP address, start the dhcp  server, setup firewall/nat and start hostapd. That&#8217;s all to it. Your  devices would be able to use the wifi adapter as the access point.</li>
</ol>
<h3 id="Procedure">Procedure</h3>
<pre>apt-get install dhcp3-server hostapd</pre>
<p>Modify <tt>/etc/hostapd/hostapd.conf</tt> and put the following</p>
<pre>interface=wlan0
driver=nl80211
ssid=MyAP
hw_mode=g
channel=11
wpa=1
wpa_passphrase=MyPasswordHere
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_ptk_rekey=600</pre>
<p>The dhcpd.conf section in <tt>/etc/dhcp3/dhcpd.conf</tt> would have something like the following</p>
<pre>subnet 10.10.0.0 netmask 255.255.255.0 {
        range 10.10.0.25 10.10.0.50;
        option domain-name-servers 8.8.4.4, 208.67.222.222;
        option routers 10.10.0.1;
}</pre>
<p>Modify <tt>/etc/default/dhcp3-server</tt></p>
<pre>INTERFACES="wlan0"</pre>
<p>Check what name your adapter got via <tt>iwconfig</tt>. You can change the name also and make it persistent via <tt>/etc/udev/rules.d/70-persistent-net.rules</tt> so that it always gets a single type of name. In our example we&#8217;re  assuming wlan0, but it could be changed. Make necessary changes in your  configuration too.</p>
<p>Configure the new interface</p>
<pre>ifconfig wlan0 10.10.0.1</pre>
<p>The above could also be done in a better way via the <tt>/etc/network/interfaces</tt> file, but didn&#8217;t try it out. In any case if you shutdown hostapd, the  network interface (wlan0) loses its address, so need to put a script  which assigns it again before hostapd is started. An example could be</p>
<pre>iface wlan0 inet static
 address 10.10.0.1
 netmask 255.255.255.0</pre>
<p>Restart the dhcp3-server. It should now be ready to serve addresses and is also bound to the network interface too.</p>
<p>Allow ip masquerading</p>
<pre>echo "1" &gt; /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</pre>
<p>Now start hostapd and see the messages that it shows</p>
<pre>hostapd -dd /etc/hostapd/hostapd.conf</pre>
<p>Wait  for a few seconds, it should show some probes being done by other wifi  devices. If it shows, then probably you&#8217;re in good luck.</p>
<p>Now try to connect via your device to this access point. It should work.</p>
<p>To make this work on boot, can put the relevant config in <tt>/etc/default/hostapd</tt></p>
<pre>RUN_DAEMON="yes"
DAEMON_CONF="/etc/hostapd/hostapd.conf"
DAEMON_OPTS="-dd"</pre>
<p>and also put the firewall rules in /etc/rc.local (make sure its executable).</p>
<p>Remember  &#8211; if you shutdown your hostapd, the network card would lose its  address. So you have to assign that again before starting hostapd. The  usual practice would be</p>
<ul>
<li>Stop hostapd</li>
<li>Stop dhcp server</li>
<li>Restart network (or rather <tt>ifup wlan0</tt> / <tt>ifconfig wlan0 10.10.0.1</tt> would do)</li>
<li>Restart dhcp server</li>
<li>Start hostapd</li>
</ul>
<h3 id="Miscellaneous">Miscellaneous</h3>
<ol type="1">
<li>You can check the wifi interfaces via
<pre>iwconfig</pre>
</li>
<li>To  set a wifi adapter into master mode, try the following. If it doesn&#8217;t  work and shows an error that it&#8217;s not possible or something, fret not &#8211;  use hostapd as that&#8217;ll do that in any case.
<pre>iwconfig wlan0 mode Master</pre>
</li>
<li>Network  Manager could create issues, though in my test environment &#8211; instead of  using an ethernet interface, I used two wlan interfaces, one being  controlled by Network Manager for internet access, and other for making  it an access point.</li>
<li><tt>modprobe -r ath5k</tt> / <tt>modprobe -r rt2800usb</tt> etc. is to be used for unloading the modules.</li>
<li>If you wish to proceed without using authentication so that you can test it easy, then put the following in <tt>/etc/hostapd/hostapd.conf</tt>
<pre>interface=wlan0
driver=nl80211
ssid=MyAP
hw_mode=g
channel=11</pre>
</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=97&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2011/03/31/making-a-wifi-hotspot-access-point-using-linux-wifi-lan-cardusb-adapter/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Recovering contacts from Backup.arc on Nokia Series 60 3rd edition devices</title>
		<link>http://exain.wordpress.com/2011/01/06/recovering-contacts-from-backup-arc-on-nokia-series-60-3rd-edition-devices/</link>
		<comments>http://exain.wordpress.com/2011/01/06/recovering-contacts-from-backup-arc-on-nokia-series-60-3rd-edition-devices/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 12:28:13 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[backup.arc]]></category>
		<category><![CDATA[contacts.cdb]]></category>
		<category><![CDATA[nbuexplorer]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[symbian]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=89</guid>
		<description><![CDATA[I have a Nokia E61 (Symbian Series 60 3rd Edition &#8211; v9.1). I usually take backups on my memory card in the phone (I&#8217;ve three of them) and restore them in case it&#8217;s necessary. However, today when I tried to do it, it wouldn&#8217;t restore and always ask for a &#8220;Restart&#8221; after flashing &#8220;Restoring&#8230;&#8221; screen [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=89&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a Nokia E61 (<strong>Symbian Series 60 3rd Edition &#8211; v9.1</strong>). I usually take backups on my memory card in the phone (I&#8217;ve three of them) and restore them in case it&#8217;s necessary. However, today when I tried to do it, it wouldn&#8217;t restore and always ask for a &#8220;Restart&#8221; after flashing &#8220;Restoring&#8230;&#8221; screen for a split second. I tried all my other backups made during last 1 year and it just won&#8217;t work. I even hard-reset/formatted the phone by pressing *,3 and call key and then starting the phone, assuming that maybe there&#8217;s some issue with the firmware. It just didn&#8217;t work. I&#8217;d my latest backup available on my memory card and I couldn&#8217;t use it. After spending more than a few hours, I managed to retrieve information, more importantly my contacts.</p>
<p>Credit goes to</p>
<ul>
<li>Michael Montey from <a href="http://groups.google.com/group/noki-sms/browse_thread/thread/1012e376016ca2ba">http://groups.google.com/group/noki-sms/browse_thread/thread/1012e376016ca2ba</a></li>
<li><a title="Profile of petrusek on Sourceforge.net" href="http://sourceforge.net/users/petrusek">petrusek</a> &#8211; who created NbuExplorer (<a title="NbuExplorer by petrusek" href="http://nbuexplorer.sourceforge.net">http://nbuexplorer.sourceforge.net</a>)</li>
</ul>
<p>Here&#8217;s how I retrieved all the Contacts. It assumes you have a Backup.arc with you. If you&#8217;ve taken backup on the memory card and view the contents of the memory card on computer, you&#8217;ll see a Backup/ folder in which the Backup.arc would be there. If not, tough luck.</p>
<ol>
<li>It works only on Windows. I used Windows XP.</li>
<li>Install NbuExplorer from <a href="http://nbuexplorer.sourceforge.net">http://nbuexplorer.sourceforge.net</a> &#8211; it requires <a title="Download .Net Framework 2.0 from MS website" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;displaylang=en">.Net Framework 2.0</a> which I downloaded from Microsoft website, so install the framework prior to opening NbuExplorer.</li>
<li>Install Java 1.4.2 and Symbian SDK. As of now I&#8217;m not too sure that Java 1.4.2 would be necessary at all. For Symbian SDK, you need to be a member of <a href="http://forum.nokia.com">Nokia Forum</a> &#8211; the version that I downloaded was <a title="Symbian SDK for Series 60 3rd Edition devices" href="http://www.forum.nokia.com/info/sw.nokia.com/id/05c63dfd-d6e9-4c0e-b185-d365e7001aeb/S60-SDK-0548-3.0-f.3.215f.zip.html">S60-SDK-0548-3.0-f.3.215f.zip</a></li>
<li>Now open NbuExplorer and point it to the Backup.arc file. It should show the contents in it including pictures, sounds etc.</li>
<li>You need to locate the file having the name <strong>Contacts</strong> and ending with the extension <strong>.cdb</strong>. In my case the name was<strong> DBS_100065FF_Contacts.cdb</strong> and it was under <strong>C: -&gt; private -&gt; 100012a5</strong> within the NbuExplorer interface. Once you locate it, right-click on the file name and select &#8216;Export selected file(s)&#8217;. It&#8217;ll ask you for a location &#8211; you may select &#8220;Desktop&#8221;. Keep that file safe &#8211; it has all your contacts.</li>
<li>Now close NbuExplorer and start Symbian Emulator. It would open a Symbian interface &#8211; you need to add a new contact in there. You can add anything. We just want it to build a contact database of its own which we&#8217;ll eventually replace with our own contact database. Once done, close the Emulator.</li>
<li>Next step is to replace the contact database created by the emulator by our actual database which has our contacts. In my case I went to C:\Symbian\9.1\S60_3rd\Epoc32\winscw\c\private\100012a5. The file DBS_100065FF_Contacts.cdb was already present. I replaced it with my actual file which I&#8217;d retrieved via NbuExplorer.</li>
<li>We&#8217;ll add a memory card to our Symbian Emulator. For that edit the file <strong>epoc.ini</strong>which is located in C:\Symbian\9.1\S60_3rd\Epoc32\Data and modify the following values so that they look like the following<br />
_EPOC_DRIVE_E \epoc32\winscw\e<br />
_EPOC_LocDrv_1 E: FAT</li>
<li>Let&#8217;s start the Emulator now. If you go to contacts, if all goes well you should be seeing all your contact listing. Hurray! Step 1 done.</li>
<li>Now we&#8217;ll need to transfer the contacts to the memory card. Mark all contacts and then select &#8220;Copy to memory card&#8221; from within the emulator interface. It should say that it has copied them to the memory card.</li>
<li>Now go to the &#8220;e&#8221; drive created via epoc.ini, that is, in C:\Symbian\9.1\S60_3rd\Epoc32\winscw\e. There would be a folder called &#8220;Others&#8221; inside which there&#8217;d be &#8220;Contacts&#8221;. If all goes well, you should see a lot of <strong>.vcf</strong> entries inside it. Those are your contacts. Copy them to an actual memory card of the phone &#8211; in the same directory (Others\Contacts). Now put the memory card in your phone.</li>
<li>In your phone, open &#8220;Contacts&#8221;, and then select the option <strong>Copy -&gt; From memory card</strong>. The contacts would be copied. For me it retrieved all information with precision.</li>
</ol>
<p>I had evaluated <a href="http://www.nokisoft.com/noki/">Nokisoft.com&#8217;s Noki Explorer</a> application. There were two things I wasn&#8217;t sure of, (a) it retrieved 30 contacts in the trial version, but the data that was retrieved was not complete; and (b) it seemed to be a tad expensive for one time use. Nokisoft&#8217;s explorer may be easier to retrieve contacts &#8211; that you can decide.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=89&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2011/01/06/recovering-contacts-from-backup-arc-on-nokia-series-60-3rd-edition-devices/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Asterisk Basics, and Load Balancing via DUNDi</title>
		<link>http://exain.wordpress.com/2010/07/03/asterisk-basics-and-load-balancing-via-dundi/</link>
		<comments>http://exain.wordpress.com/2010/07/03/asterisk-basics-and-load-balancing-via-dundi/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 08:23:30 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dundi]]></category>
		<category><![CDATA[iax]]></category>
		<category><![CDATA[iax2]]></category>
		<category><![CDATA[jr richardson]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[load sharing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pbx]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[sip]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=74</guid>
		<description><![CDATA[IMPORTANT: The configurations, that is, the code sections underneath are not wrapped. However, if you want to copy paste them, you can just select them and despite they being not visible to you, they&#8217;ll get copied into the clipboard. Otherwise you may want to refer to the PDF version. Prepared by : Vivek Kapoor http://exain.com [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=74&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>IMPORTANT:</strong> The configurations, that is, the code sections underneath are not wrapped. However, if you want to copy paste them, you can just select them and despite they being not visible to you, they&#8217;ll get copied into the clipboard. Otherwise you may want to refer to the PDF version.</p>
<p>Prepared by : Vivek Kapoor <a href="http://exain.com/">http://exain.com</a><br />
Prepared on : 01 July 2010<br />
PDF Version : <a href="http://exain.files.wordpress.com/2010/07/asterisk_basics_load_balancing_dundi_vivek_kapoor.pdf">Asterisk_Basics_Load_Balancing_DUNDi_Vivek_Kapoor</a></p>
<h2 id="head-5cb82ee8a71a410f7a31417a845e23dedd8c3cf3">Purpose of  this document</h2>
<p>Asterisk is an open source PBX. Which means, you can  setup your own little telephone exchange in your home/office  environment. On a much larger usage, you may look forward to setting up a  redundant phone setup wherein multiple boxes are interconnected with  each other and provide some sort of failover capability and easier  management, which is possible through something called DUNDi. This  document aims to provide such a solution with a possibility of  horizontal scaling instead of vertical scaling. So, this may mean that  by using low-end commodity hardware, you can setup a strong telephone  infrastructure which can cater to thousands of users.</p>
<p>Read the document carefully. Read it fully before you  start implementing it. It is intentionally detailed so that you know  what you&#8217;re doing.</p>
<h2 id="head-772a8099db808fe0fb818839c5e35374ef33b2bf">Acknowledgements</h2>
<p>All credit of this document goes  to JR Richardson. I&#8217;m afraid I&#8217;ve not been able to find a suitable link  for him, but his whitepapers and presentations are the ones which helped  me move forward. And of course, <a href="http://www.voip-info.org/wiki/view/Mark+Spencer">Mark Spencer</a> &#8211;  the guy behind Asterisk. Without him this document wouldn&#8217;t have  existed.</p>
<p>The writings by JR Richardson</p>
<ul>
<li><a href="http://www.voip-info.org/storage/users/813/47813/images/1654/DUNDi_So_Easy.pdf">http://www.voip-info.org/storage/users/813/47813/images/1654/DUNDi_So_Easy.pdf</a></li>
<li><a href="http://atlaug.com/stuff/Presentations/Astricon06/JR_Richardson_Whitepaper.pdf">http://atlaug.com/stuff/Presentations/Astricon06/JR_Richardson_Whitepaper.pdf</a></li>
</ul>
<h2 id="head-c49b50ed6cb94d8e7f7819cd5629decd19564e8d"><span id="more-74"></span>Disclaimer</h2>
<p>Though I have significant  experience doing Linux and related systems, but I&#8217;m more of a novice in  Asterisk. The following may or may not work for you. I don&#8217;t provide any  warranty whatsoever of it being successful, or rather, consistently  successful, and providing an actual load balanced solution. I&#8217;ve yet to  implement it in a production setup, and hence all you do is at your own  risk. The below procedure SHOULD work, but I CANNOT say that it WILL  work.</p>
<h2 id="head-b6c735c2c05c6aff230729e678bd325ac120c9dc">Before we  begin</h2>
<p>A little about the nomenclature</p>
<ul>
<li><strong>Asterisk</strong> : <a href="http://asterisk.org/">http://asterisk.org</a> It  is a PBX (Private Branch Exchange) software which runs on Linux  platform. It allows you to have VOIP facility without incurring cost on  proprietary hardware, and can run off a home desktop system.</li>
<li><strong>DUNDi</strong> : <a href="http://dundi.com/">http://dundi.com</a> DUNDi is  a peer-to-peer system for locating Internet gateways to telephony  services. Unlike traditional centralized services (such as the  remarkably simple and concise ENUM standard), DUNDi is fully-distributed  with no centralized authority whatsoever. We will be using it to  interconnect multiple asterisk boxes and setting up a load balanced  environment which will also act as a failover.</li>
<li><strong>SIP  Softphone</strong> : A softphone running from your desktop which allows  you to register to asterisk and enable VOIP communication. I, for this  document, use Zoiper &#8211; <a href="http://zoiper.com/">http://zoiper.com</a></li>
<li><strong>RealTime</strong> : <a href="http://www.voip-info.org/wiki/view/Asterisk+RealTime">http://www.voip-info.org/wiki/view/Asterisk+RealTime</a> It will allow us to connect to MySQL and have the users registered in  there instead of being hard coded in sip configuration. This way it will  be possible to have users register to any registration server and not  just one on which they&#8217;re configured.</li>
</ul>
<p>You  need to have some experience related to Linux systems. You should be  comfortable in compiling applications from scratch. The method mentioned  in this email should work as is, but if there are issues, then you  would be resolving them on your own. Also, it is highly recommended to  have some working knowledge about Asterisk. You should have setup some  Asterisk based environment &#8211; if you&#8217;ve not done that yet, then I think  you should first concentrate on that. You&#8217;ll be delighted to see what  all is possible through Asterisk.</p>
<h2 id="head-c53a401d9388b30d213d853eeccea7d256733117">Quick look at  the steps</h2>
<p>To make it work with the minimum  configuration, we&#8217;ll proceed step by step so that we don&#8217;t miss a thing.  This means we&#8217;ll not jump straight-away to the fully functional DUNDi  setup, but do it slowly, understanding each step as we do it. Here&#8217;s how  we&#8217;ll move forward</p>
<ol type="1">
<li>Installation of  Asterisk on a Debian/Ubuntu systems (2 systems initially, later 3)</li>
<li>Basic  SIP User Creation &amp; Testing</li>
<li>Making  it work with DUNDi &#8211; 2 Server Setup</li>
<li>More  DUNDi &#8211; 3 Server Setup</li>
<li>Adding RealTime to it</li>
<li>What&#8217;s  next</li>
</ol>
<h2 id="head-4c4d3ab8c42578ad60df09b94e8034eb4d41e6c4">Asterisk  Installation</h2>
<ol type="1">
<li>You need to  have atleast TWO working Debian/Ubuntu machine. I will be using THREE  machines eventually, but will start with two. Though the following would  work for any Linux distribution available, the steps related to  installation and initialization of packages could vary &#8211; so you may  refer to the documentation of your distribution.</li>
<li>I am using Virtual Machines running via KVM  for this exercise. You may use Virtualbox, Xen, or any of your  preferred solutions. Here&#8217;s the basic structure
<ul>
<li>Server A, IP: 192.168.1.5, MAC Address:  00:16:36:99:54:62</li>
<li>Server  B, IP: 192.168.1.6, MAC Address: 00:16:36:2f:11:9c</li>
<li>Server C, IP: 192.168.1.10, MAC Address:  00:16:36:6e:d7:dc</li>
</ul>
</li>
<li>Three packages are required from the asterisk website,  the asterisk package itself, dahdi &amp; asterisk-addons for mysql  support. Get them from <a href="http://asterisk.org/">http://asterisk.org</a> &#8211; I chose the following versions which were the latest at the time of  writing this article
<ul>
<li>asterisk-1.6.2.8.tar.gz</li>
<li>dahdi-linux-complete-2.3.0.1+2.3.0.tar.gz</li>
<li>asterisk-addons-1.6.2.1.tar.gz</li>
</ul>
</li>
<li>The  installation steps are as under. The asterisk installation documents are  readily available on the internet, so you may try out a more detailed  ones. Here&#8217;s what will get you started</li>
<li>Install  the pre-requisites first
<pre>apt-get install linux-headers-$(uname -r) build-essential automake autoconf bison flex libtool libncurses5-dev libssl-dev libgsm1 libgsm1-dev libgsmme-dev libgsm-tools libxml2-dev libmysqlclient-dev
</pre>
</li>
<li>Untar all the downloaded packages  (asterisk, dahdi and asterisk-addons) into /usr/local/src and then one  by one run the following
<pre># Dahdi First
cd dahdi-linux-complete-2.3.0.1+2.3.0
make clean
make
make install
make config

# Now for Asterisk
cd asterisk-1.6.2.8
make clean
./configure
make install
make samples
make config

# Last, the asterisk add-ons (important for MySQL support)
cd asterisk-addons-1.6.2.1
make clean
./configure
make menuselect # Optional - I usually disable h323 support
make
make install
make samples
</pre>
</li>
<li>DAHDI may require some  downloading from the Internet, so make sure you have the machine  connected to the Internet, or use a proxy by using
<pre>export http_proxy=http://your.proxy.ip:port
</pre>
</li>
<li>That&#8217;s all. Asterisk is  configured. You may run the following to verify.
<pre>/etc/init.d/asterisk start
asterisk -r
/etc/init.d/asterisk stop
</pre>
</li>
</ol>
<h2 id="head-a8a5df090d6a1fc572cc5333604455320934c6fe">Basic SIP  User Creation &amp; Testing</h2>
<p>For each file listed below,  certain changes are done. You can name as per your convenience, but it  should match in all the relevant sections further in the document.</p>
<h3 id="head-25d837deea2afb4f6923e660cf51fe4d3975bde2">Server A,B  &amp; C : /etc/asterisk/asterisk.conf</h3>
<p>Uncomment  the following</p>
<pre>verbose = 14
</pre>
<h3 id="head-b334f1037b3ac7cba5f2ad45c2af4eb86bd88123">Server A :  /etc/asterisk/sip.conf</h3>
<pre>[general]
srvlookup=no
NAT=yes
bindport=5060
allowguest=no
canreinvite=no

[1001]
type=friend
context=internal
host=dynamic
disallow=all
allow=gsm
canreinvite=no
qualify=yes
</pre>
<p>You can change bindport as per the requirements. If you  happen to change the bindport to, say, 5070, then while configuring  Zoiper, in the domain section, write something like 192.168.1.5:5070</p>
<h3 id="head-1579082612d2bf39e26e66c655b12996a130d499">Server A :  /etc/asterisk/extensions.conf</h3>
<pre>[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[internal]
exten =&gt; 123,1,Playback(demo-congrats)
exten =&gt; 123,n,Hangup()
</pre>
<h3 id="head-bc17a742eb4894ce0ae6be116419f2d3ba0ab94c">Server B :  /etc/asterisk/sip.conf</h3>
<pre>[general]
srvlookup=no
NAT=yes
bindport=5060
allowguest=no
canreinvite=no

[1002]
type=friend
context=internal
host=dynamic
disallow=all
allow=gsm
canreinvite=no
qualify=yes
</pre>
<h3 id="head-107783a09499cf4be44d474a0d5b8be801148f62">Server B :  /etc/asterisk/extensions.conf</h3>
<pre>[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[internal]
exten =&gt; 456,1,Playback(demo-congrats)
exten =&gt; 456,n,Hangup()
</pre>
<h3 id="head-ab17a8888badfc64072f2bd87d099c4e0dd76e8f">Testing the  setup</h3>
<p>What we see above is that there  are two servers, Server A and Server B. Server A has SIP user 1001, and  Server B has 1002. Both the users belong to a context called &#8220;internal&#8221;,  which probably means that when they dial in any extension, the first  context that they&#8217;ll hit is &#8220;internal&#8221;, and from there onwards they&#8217;d be  redirected to other contexts as per the dial plan.</p>
<p>The context &#8220;internal&#8221; is defined in &#8220;extensions.conf&#8221;  file. There&#8217;s not much in that context except one single extension, 123  in Server A and 456 in Server B. When that extension is called, a  congratulations message is played. So to test it, I have used an  application called Zoiper which allows two lines to be connected. You  can download Zoiper from <a href="http://www.zoiper.com/softphone/">http://www.zoiper.com/softphone/</a> &#8211; I used Zoiper Classic for Linux.</p>
<p>Let&#8217;s start  asterisk first on Server A &amp; Server B by using</p>
<pre>/etc/init.d/asterisk start
</pre>
<p>and then connect to an asterisk  session by using</p>
<pre>asterisk -r
</pre>
<p>I created two SIP accounts in Zoiper, for Server A I  entered 192.168.1.5 as domain, and 1001 as username, and for Server B I  entered 192.168.1.6 as domain and 1002 as username. Rest of the details  can be added as per your preference. I deselected the &#8220;Register on  startup&#8221; option under advanced settings. Then on the Zoiper interface I  registered to both the servers.</p>
<p>On Server A,  something like the following should appear when you list the sip peers</p>
<pre>CLI&gt; sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
1001/1001                  xx.xx.xx.xx     D   N       5060     OK (116 ms)
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
CLI&gt;
</pre>
<p>Same goes for Server B. It should show something like  the following</p>
<pre>CLI&gt; sip show peers
Name/username              Host            Dyn Nat ACL Port     Status
1002/1002                  xx.xx.xx.xx     D   N       5060     OK (134 ms)
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
CLI&gt;
</pre>
<p>Now select in Zoiper, the Server A Account and dial 123 &#8211;  it should playback the congratulations message. If you try to dial 456,  it&#8217;ll not work. But if you select Server B in the Account, and then  dial 456, it should work as expected.</p>
<p>A sample  screenshot of Zoiper is below</p>
<p><a href="http://exain.files.wordpress.com/2010/07/zoiperscreen01.png"><img class="alignnone size-full wp-image-80" title="Zoiper Screenshot for DUNDi" src="http://exain.files.wordpress.com/2010/07/zoiperscreen01.png?w=600" alt="Zoiper Screenshot for DUNDi"   /></a></p>
<p>Also check the messages that appear in the console that  you&#8217;d opened earlier (by using asterisk -r). A sample of the same on  Server A is as under</p>
<pre>CLI&gt;
  == Using SIP RTP CoS mark 5
    -- Executing [123@internal:1] Playback("SIP/1001-00000001", "demo-congrats") in new stack
    -- &lt;SIP/1001-00000001&gt; Playing 'demo-congrats.gsm' (language 'en')
    -- Executing [123@internal:2] Hangup("SIP/1001-00000001", "") in new stack
  == Spawn extension (internal, 123, 2) exited non-zero on 'SIP/1001-00000001'
CLI&gt;
</pre>
<p>So, our basic configuration is working fine. If you add  more SIP users in sip.conf file, and add relevant extensions in  extensions.conf file, then you can have a single server PBX running  perfectly fine. It is important to have the above working so that we can  be sure that our setup is ready for DUNDi.</p>
<h2 id="head-28a0e7e8fc13bd93f1f0106c0dd129ac20ae5a33">Making it  work with DUNDi &#8211; 2 Server Setup</h2>
<p>Before we delve further into  DUNDi, please remember that the most important thing here is &#8220;contexts&#8221;.  If you specify them incorrectly, it wouldn&#8217;t work as expected and  you&#8217;ll be left wondering what&#8217;s happening.</p>
<p>Let&#8217;s begin now in a two server configuration. The  purpose here is that extension 1001 would be registered on Server A, and  1002 on Server B. But, via DUNDi, Server A would know that extension  1002 is on Server B, and would effectively be able to call it too.</p>
<h3 id="head-b334f1037b3ac7cba5f2ad45c2af4eb86bd88123-2">Server A :  /etc/asterisk/sip.conf</h3>
<p>Add a new context (regcontext to  be precise) called &#8220;dundiextens&#8221; in the [general] section. It&#8217;s a  pretty simple file</p>
<pre>[general]
regcontext=dundiextens
srvlookup=no
NAT=yes
bindport=5060
allowguest=no
canreinvite=no

[1001]
type=friend
context=internal
host=dynamic
disallow=all
allow=gsm
canreinvite=no
qualify=yes
</pre>
<p>The <strong>regcontext</strong> parameter is very  important here. It auto-creates a context as soon as a SIP user logs in  (in our case the context will be dundiextens). This is used and searched  by DUNDi to get to the desired extension. Later we&#8217;ll see how to view  the users who belong to &#8220;dundiextens&#8221; context.</p>
<h3 id="head-bc17a742eb4894ce0ae6be116419f2d3ba0ab94c-2">Server B :  /etc/asterisk/sip.conf</h3>
<p>Similar to Server A, the new  context has to be added. The following would be the final sip.conf for  Server B.</p>
<pre>[general]
regcontext=dundiextens
srvlookup=no
NAT=yes
bindport=5060
allowguest=no
canreinvite=no

[1002]
type=friend
context=internal
host=dynamic
disallow=all
allow=gsm
canreinvite=no
qualify=yes
</pre>
<h3 id="head-5fa406b9dc3e7c397681f1129d678cecef7c7ad9">Server A  &amp; B : /etc/asterisk/iax.conf</h3>
<p>We will be using IAX2 trunk to  interconnect the DUNDi boxes. IAX2 doesn&#8217;t work too well in virtual  machines as it requires a timing device/timing source. For me it didn&#8217;t  work well as far as Playback() was concerned, but when doing a voice  call everything seemed to be just fine. I&#8217;ve not been able to figure out  if it&#8217;s a timing device/virtual machine issue or it&#8217;s just some setting  in iax.conf that needs to be done. If I run dahdi_test in a virtual  machine, the results are always above 99.6%. The same is with a  dedicated machine, so I guess the timing source seems to okay.</p>
<p>Tried using SIP Trunk also, but it causes a number of  issues when doing RealTime. When using RealTime the users were  registered multiple times on Asterisk box, so 1001 which was initially  registered on Server A got registered on Server B as well. Also, I  wasn&#8217;t able to figure out a way to send a call from Server A to a  particular context on Server B. It also caused a bit of scalability  issues as well since if using dedicated trunks then I&#8217;d have to provide  each server&#8217;s details in sip.conf of all servers. So when a new server  is added, the sip.conf would need to be updated on all the servers,  which isn&#8217;t that elegant (because then sip reload would also be called).</p>
<p>Here&#8217;s the content of the  &#8220;iax.conf&#8221; file where [iaxuser] is added. It&#8217;s the same on each server</p>
<pre>[general]
jitterbuffer=no
nochecksums=no
disallow=all
allow=gsm

[iaxuser]
type=friend
dbsecret=dundi/secret
context=incomingdundi
</pre>
<p>So, as we see, there are three contexts we&#8217;ve  encountered till now. Context &#8220;internal&#8221;, which is associated with the  SIP user being registered, context &#8220;dundiextens&#8221; which is auto-created  as soon as the first user registers on a particular server, and lastly  context &#8220;incomingdundi&#8221; &#8211; this is used when a call arrives via the IAX  trunk. All these have to be mentioned in extensions.conf of each server.</p>
<p>If you notice, there&#8217;s a  parameter &#8220;dbsecret&#8221; in the file. I guess it allows one server to  authenticate to another by using a username/password combination. The  advantage is that it&#8217;s just a username/password authentication and not  any server information hard coded. Which has the best advantage that if  any new server is added to the cluster, it&#8217;ll automatically be  authenticated. Also, I had read somewhere, probably in the links below,  that &#8220;dundi/secret&#8221; value for &#8220;dbsecret&#8221; is to be taken literally &#8211; you  shouldn&#8217;t be changing it.</p>
<p>If you want  to read about using IAX and SIP trunks in DUNDi, you can refer to the  following</p>
<ul>
<li><a href="http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+IAX">http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+IAX</a></li>
<li><a href="http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+SIP">http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+SIP</a> (this doesn&#8217;t work yet)</li>
<li><a href="http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+SIP+with+no+passwords">http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+SIP+with+no+passwords</a></li>
</ul>
<h3 id="head-a0d8086c96a9f4707625cd89d7cfa0b1153320d9">DUNDi key  generation</h3>
<p>Before we  proceed further, we will need to create a couple of keys on one server,  and COPY it to another server. I haven&#8217;t tried creating different keys,  so cannot confirm otherwise.</p>
<p>On Server A,  go to /var/lib/asterisk/keys directory, and execute the following</p>
<pre>astgenkey -n dundi
</pre>
<p>and when it asks for pressing  ENTER, just do that. A couple of files would be created in that  directory &#8211; dundi.key &amp; dundi.pub. Copy both the files to Server B  in the same directory &#8211; /var/lib/asterisk/keys. This essentially means  that dundi.key and dundi.pub are identical on both the servers, and  would remain identical as new servers join the cluster.</p>
<h3 id="head-fc13fe593be8f57fd61bed78cb936074fb731c52">Server A :  /etc/asterisk/dundi.conf</h3>
<p>dundi.conf has three primary  sections, [general], [mapping] and peer information to which it can  place queries. Here&#8217;s what needs to be in dundi.conf</p>
<pre>; Part 1
[general]
department=Your Department
organization=Your Company, Inc.
locality=Your City
stateprov=ST
country=US
email=your@email.com
phone=+12565551212

bindaddr=192.168.1.5
port=4520
entityid=00:16:36:99:54:62
cachetime=5
ttl=2
autokill=yes

; Part 2
[mappings]
priv =&gt; dundiextens,0,IAX2,iaxuser:${SECRET}@192.168.1.5/${NUMBER},nopartial

; Part 3
[00:16:36:2f:11:9c] ; MAC Address of Server B
model = symmetric
host = 192.168.1.6 ;(this is the IP address of the DUNDi Server B)
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
order = primary
</pre>
<p>Let&#8217;s move to each item step by step</p>
<p>Part 1 &#8211; The [general] section is self explanatory.  Following points should be looked into</p>
<ul>
<li>bindaddr=192.168.1.5  &lt;- The IP Address of your existing machine</li>
<li>entityid=00:16:36:99:54:62  &lt;- The MAC address of the interface for 192.168.1.5. However, it  could be any mac address that you own, that is, it should be something  unique.</li>
<li>cachetime=5 &lt;- Better to have it at 5 seconds than  3600 seconds if it&#8217;s a closed group network. If there&#8217;s a failure of one  server, the re-requests shall be redirected to other servers after 5  seconds have elapsed. May not be good if you&#8217;re connecting to outside  servers not in your domain as it has to potential for frequent queries  if there&#8217;s heavy traffic.</li>
<li>ttl=2 &lt;- The number of DUNDi lookup requests made.  So, if request goes to Server B from Server A, then that&#8217;s one request.  Now Server B can make a maximum of 1 more request to other servers it  has paired with.</li>
</ul>
<p>Part  2 &#8211; The [mapping] section defines what you will provide as the contact  address when another server gets in touch with you. So, if a SIP  extension is registered with you, you will provide the server asking for  that extension a complete path to your machine. If we break the  following statement,</p>
<pre>priv =&gt; dundiextens,0,IAX2,iaxuser:${SECRET}@192.168.1.5/${NUMBER},nopartial
</pre>
<p>As per the documentation, here &#8220;priv&#8221; is the DUNDi  context and will be used by DUNDi. We&#8217;ll see later how it&#8217;s used in  extensions.conf file. Then comes the local context which it&#8217;ll search.  In our case it&#8217;s &#8220;dundiextens&#8221; which we defined in sip.conf under the  regcontext parameter. Then is the weight, the technology being used, the  destination that is to be sent to the server requesting information,  and then further options. You can review DUNDi documentation at <a href="http://www.voip-info.org/wiki/view/DUNDi">http://www.voip-info.org/wiki/view/DUNDi</a> for more details on each of the parameters.</p>
<p>Part 3 &#8211; These are the peers that you&#8217;ll register with  for looking up / doing DUNDi searching. So, if you have multiple  servers, then you&#8217;ll need to have multiple peer definitions similar to  the one mentioned earlier. Since we&#8217;re using only one Server (Server B) as the peer, we&#8217;ve entered that  information in dundi.conf. I think the MAC addresses are more for  consistency than any technical verification, so you should be able to  connect machines outside your network too &#8211; across the globe maybe.</p>
<h3 id="head-2713315c8369ef73dbfb748125518254870f2ce8">Server B :  /etc/asterisk/dundi.conf</h3>
<p>In continuation to the concept  above, we&#8217;ll add the dundi.conf for Server B. Here&#8217;s an example</p>
<pre>; Part 1
[general]
department=Your Department
organization=Your Company, Inc.
locality=Your City
stateprov=ST
country=US
email=your@email.com
phone=+12565551212

bindaddr=192.168.1.6
port=4520
entityid=00:16:36:2f:11:9c
cachetime=5
ttl=2
autokill=yes

; Part 2
[mappings]
priv =&gt; dundiextens,0,IAX2,iaxuser:${SECRET}@192.168.1.6/${NUMBER},nopartial

; Part 3
[00:16:36:99:54:62] ; MAC Address of Server A
model = symmetric
host = 192.168.1.5 ;(this is the IP address of the DUNDi Server A)
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
order = primary
</pre>
<p>Our DUNDi configuration is complete. Now Server A has  Server B as DUNDi peer, and vice versa. This means if Server A queries  Server B, then Server B would respond favorably and provide the location  to the SIP extension if it exists on that server (and of course vice  versa).</p>
<h3 id="head-1579082612d2bf39e26e66c655b12996a130d499-2">Server A :  /etc/asterisk/extensions.conf</h3>
<p>Now, for  DUNDi we&#8217;ll need to work up a bit more. Following is the extensions.conf  for each of the contexts mentioned above, that is, internal,  dundiextens, and incomingdundi</p>
<pre>[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[lookupdundi]
switch =&gt; DUNDi/priv

[internal]
exten =&gt; 123,1,Playback(demo-congrats)
exten =&gt; 123,n,Hangup()

include =&gt; lookupdundi

exten =&gt; _XXXX,2,Playback(demo-congrats)
exten =&gt; _XXXX,n,Hangup()

[incomingdundi]
exten =&gt; _XXXX,1,Goto(internal,${EXTEN},2)
</pre>
<p>We&#8217;ve created a new context called [lookupdundi]. This  performs the actual lookup, and if you notice, it does search the &#8220;priv&#8221;  context mentioned in dundi.conf file.</p>
<p>The [internal] context still has the extension 123 on  which demo-congrats is being played. However, we have included  &#8220;lookupdundi&#8221; context in there, and further to that created a pattern of  4 digits starting from Priority 2. Priority 2 is very important here.  Why? Because when a SIP Phone is registered, due to the regcontext being  specified in sip.conf, a Priority 1 with NoOp is already created, which  you can see by typing &#8220;dialplan show dundiextens&#8221; on the asterisk  prompt after the SIP phone is registered. So, when the phone will reach  the &#8220;internal&#8221; context, it&#8217;ll look for Priority 2, and that&#8217;s what we  need to provide.</p>
<p>The last  context, [incomingdundi] is called via the IAX Trunk that we created  (called &#8220;iaxuser&#8221; in sip.conf). This transfers the request to &#8220;internal&#8221;  context on Priority 2.</p>
<p>So, it  signifies that, primarily the &#8220;internal&#8221; context is the one where in the  primary dialplan would be written related to what will happen to a call  once it arrives. At this stage, we are not doing anything except  playing a congratulations message.</p>
<h3 id="head-107783a09499cf4be44d474a0d5b8be801148f62-2">Server B :  /etc/asterisk/extensions.conf</h3>
<p>There&#8217;s not  much change for Server B, except having a different extension 456  instead of 123.</p>
<pre>[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[lookupdundi]
switch =&gt; DUNDi/priv

[internal]
exten =&gt; 456,1,Playback(demo-congrats)
exten =&gt; 456,n,Hangup()

include =&gt; lookupdundi

exten =&gt; _XXXX,2,Playback(demo-congrats)
exten =&gt; _XXXX,n,Hangup()

[incomingdundi]
exten =&gt; _XXXX,1,Goto(internal,${EXTEN},2)
</pre>
<h3 id="head-ab17a8888badfc64072f2bd87d099c4e0dd76e8f-2">Testing the  setup</h3>
<p>So here we are, our DUNDi  configuration with two servers is complete, and I just hope it works  without issues for you. Here is how we&#8217;ll test it.</p>
<ol type="1">
<li>Restart Asterisk and start the console on both the servers
<pre>/etc/init.d/asterisk restart
asterisk -r
</pre>
</li>
<li>Use Zoiper and register to both  Server A and Server B. You should see appropriate registration messages  in the asterisk console of both the servers.</li>
<li>Now we will see if on both servers the  &#8220;dundiextens&#8221; has been created and if the users 1001 and 1002 are part  of it.
<pre># On Server A
CLI&gt; dialplan show dundiextens
[ Context 'dundiextens' created by 'SIP' ]
  '1001' =&gt;         1. Noop(1001)                                 [SIP]

-= 1 extension (1 priority) in 1 context. =-
CLI&gt;

# On Server B
CLI&gt; dialplan show dundiextens
[ Context 'dundiextens' created by 'SIP' ]
  '1002' =&gt;         1. Noop(1002)                                 [SIP]

-= 1 extension (1 priority) in 1 context. =-
CLI&gt;
</pre>
</li>
<li>All cool.  Both our phones are registered and as you see the first priority of NoOp  is created in there. Next is to see if the peers are displayed  correctly. Server A would show Server B as its peer, and vice versa.
<pre># Server A : Listing DUNDi peers
CLI&gt; dundi show peers
EID                  Host                Model          AvgTime  Status
00:16:36:2f:11:9c    192.168.1.6         (S) Symmetric  Unavail  OK (1 ms)
1 dundi peers [1 online, 0 offline, 0 unmonitored]
CLI&gt;

# Server B : Listing DUNDi peers
CLI&gt; dundi show peers
EID                  Host                Model          AvgTime  Status
00:16:36:99:54:62    192.168.1.5         (S) Symmetric  Unavail  OK (1 ms)
1 dundi peers [1 online, 0 offline, 0 unmonitored]
CLI&gt;
</pre>
</li>
<li>Next we will see if what happens  if a lookup request is made by DUNDi from Server A to find 1001 (which  is on Server A), and 1002 (which is on Server B). As you will see,  Server A will not give a result of the extensions registered on its own  instance, but only those which are registered on other servers. So, 1001  when searched doesn&#8217;t retrieve any info, but 1002 does.
<pre>CLI&gt; dundi lookup 1001@priv
DUNDi lookup returned no results.
DUNDi lookup completed in 7 ms
CLI&gt; dundi lookup 1002@priv
  1.     0 IAX2/iaxuser:5FGlTXaaJQ+YDTZ0xmbNdQ==@192.168.1.6/1002 (EXISTS)
     from 00:16:36:2f:11:9c, expires in 5 s
DUNDi lookup completed in 8 ms
CLI&gt;
</pre>
</li>
<li>Doing the above on Server B  gives the results as expected. 1002 returns no results as it is on the  same machine, but 1001 does.
<pre>CLI&gt; dundi lookup 1001@priv
  1.     0 IAX2/iaxuser:tgz3cZ1U22WtapJcibkpFA==@192.168.1.5/1001 (EXISTS)
     from 00:16:36:99:54:62, expires in 5 s
DUNDi lookup completed in 6 ms
CLI&gt; dundi lookup 1002@priv
DUNDi lookup returned no results.
DUNDi lookup completed in 8 ms
CLI&gt;
</pre>
</li>
<li>Now let&#8217;s place a call from  Server A selected in Zoiper to 1001. It shouldn&#8217;t play anything. Then  place a call to 1002 &#8211; it should play a congratulations message, and  there should be some information displayed on Server B&#8217;s asterisk  console.</li>
</ol>
<p>If it works for you,  then it means that the DUNDi configuration is working well. If it  doesn&#8217;t, then it would show some messages at the console of what didn&#8217;t  work. You can try enabling sip debugging through</p>
<pre>sip set debug on
</pre>
<h2 id="head-6fb3221733fde213e3a443859199b2985213467c">More DUNDi &#8211; 3  Server Setup</h2>
<p>We&#8217;ll now add Server C to our  existing cluster. This will be our DUNDi lookup server and no user would  register to it.</p>
<p>JR Richardson  mentioned in his document of having a separate DUNDi lookup server  which will have all information about the peers. The advantages that it  would have is</p>
<ul>
<li>There  would be only one peer entered in all registration servers. So if a new  registration server is added to the cluster, the other registration  servers needn&#8217;t have the DUNDi entry in them.</li>
<li>It will be easier to manage since the new  registration server would be added into the DUNDi configuration of  Server C only, and all other servers would know of it instantly.</li>
</ul>
<p>Let&#8217;s move to the configuration part on each server. I  am assuming that you&#8217;ve done the basic installation of Asterisk on  Server C. There&#8217;s no need for setting up sip.conf, iax.conf or  extensions.conf on Server C, only &#8220;dundi.conf&#8221; is needed.</p>
<p>Do the following before proceeding so that you don&#8217;t  encounter weird behavior</p>
<ul>
<li>Unregister  the SIP connections in Zoiper</li>
<li>Stop  Asterisk on all three servers via
<pre>/etc/init.d/asterisk stop
</pre>
</li>
</ul>
<h3 id="head-fc13fe593be8f57fd61bed78cb936074fb731c52-2">Server A :  /etc/asterisk/dundi.conf</h3>
<p>We&#8217;ll remove Server B&#8217;s entry  from dundi.conf and add Server C&#8217;s entry. Here&#8217;s the final dundi.conf on  Server A</p>
<pre>; Part 1
[general]
department=Your Department
organization=Your Company, Inc.
locality=Your City
stateprov=ST
country=US
email=your@email.com
phone=+12565551212

bindaddr=192.168.1.5
port=4520
entityid=00:16:36:99:54:62
cachetime=5
ttl=2
autokill=yes

; Part 2
[mappings]
priv =&gt; dundiextens,0,IAX2,iaxuser:${SECRET}@192.168.1.5/${NUMBER},nopartial

; Part 3
[00:16:36:6e:d7:dc] ; MAC Address of Server C
model = symmetric
host = 192.168.1.10 ;(this is the IP address of the DUNDi Server C)
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
order = primary
</pre>
<p>Only the Peer&#8217;s MAC Address and host are changed in Part  3 of the configuration. So we have added Server C as a peer having IP  Address of 192.168.1.10.</p>
<h3 id="head-2713315c8369ef73dbfb748125518254870f2ce8-2">Server B :  /etc/asterisk/dundi.conf</h3>
<p>The configuration is almost  similar to Server A except of course the bindaddress and entityid.</p>
<pre>; Part 1
[general]
department=Your Department
organization=Your Company, Inc.
locality=Your City
stateprov=ST
country=US
email=your@email.com
phone=+12565551212

bindaddr=192.168.1.6
port=4520
entityid=00:16:36:2f:11:9c
cachetime=5
ttl=2
autokill=yes

; Part 2
[mappings]
priv =&gt; dundiextens,0,IAX2,iaxuser:${SECRET}@192.168.1.6/${NUMBER},nopartial

; Part 3
[00:16:36:6e:d7:dc] ; MAC Address of Server C
model = symmetric
host = 192.168.1.10 ;(this is the IP address of the DUNDi Server C)
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
order = primary
</pre>
<h3 id="head-4fcaf30ad99942d5a9cbc879765a81418d2737e3">Server C :  /etc/asterisk/dundi.conf</h3>
<p>Remember, you should have copied  dundi.key and dundi.pub from either Server A or Server B to Server C&#8217;s  /var/lib/asterisk/keys. The two said files should be identical on all  the machines. The DUNDi configuration will have information on the peers  to which it will connect. Since it will connect to all asterisk  registration servers, hence the peers would be Server A and Server B.</p>
<p>Here&#8217;s the configuration</p>
<pre>; Part 1
[general]
department=Your Department
organization=Your Company, Inc.
locality=Your City
stateprov=ST
country=US
email=your@email.com
phone=+12565551212

bindaddr=192.168.1.10
port=4520
entityid=00:16:36:6e:d7:dc
cachetime=5
ttl=1 ; Notice the TTL. You wouldn't want this server to loop, but only ask its peers ONCE
autokill=yes

; Part 2
[mappings]
priv =&gt; 

; Part 3
[00:16:36:99:54:62] ; Peer 1 : MAC Address of Server A
model = symmetric
host = 192.168.1.5 ;(this is the IP address of the Server A)
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
order = primary

[00:16:36:2f:11:9c] ; Peer 2 : MAC Address of Server B
model = symmetric
host = 192.168.1.6 ;(this is the IP address of the Server B)
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
order = primary
</pre>
<p>A few details on above. The &#8220;ttl&#8221; is 1 instead of 2.  Since our lookup server (Server C) is peering with all the registration  servers, it should ask them only once and the registration servers  shouldn&#8217;t forward the request to other servers. ttl=1 ensures that. If  it had been ttl=2, then registration servers (Server A &amp; B would query their peers &#8211; and their  peer is only 1, Server C &#8211; and thus it would get into an unwanted loop.</p>
<p>There&#8217;s an empty &#8220;priv =&gt; &#8221; parameter. It is there  because [mapping] somehow requires atleast one parameter, even if it&#8217;s  empty.</p>
<p>Peer 1 and Peer 2 are added.  If you add another server to it, then you just need to add an entry in  this file only and make it Peer 3 and so on.</p>
<p>That&#8217;s all to it. Let&#8217;s test this out.</p>
<h3 id="head-1f5ced979ff8befdf3f1a30bee3f40f1c0b2cc92">Testing the 3  Server Setup</h3>
<p>In our test  we have two servers, Server A and Server B on which the SIP phones  would register. Server C would act just as a lookup server and answer  requests.</p>
<ol type="1">
<li>Start Asterisk on all the  three servers and connect to their consoles.
<pre>/etc/init.d/asterisk start
asterisk -r
</pre>
</li>
<li>Now use the  command &#8220;dundi show peers&#8221;. It should show only 1 peer on Server A &amp;  B, and 2 peers on Server C. This is just fine.</li>
<li>Register your SIP  Phone on Server A &amp; B, so both extensions 1001 &amp; 1002 should be  registered.</li>
<li>Now  you can either do &#8220;dundi lookup 1001@priv&#8221; or &#8220;dundi lookup 1002@priv&#8221;  from Server C and it&#8217;ll show you both. Doing &#8220;1002@priv&#8221; from Server A  or &#8220;1001@priv&#8221; from Server B would also give you results which are  retrieved from the peer (Server C).</li>
<li>Make  a call now from Server A selected in Zoiper to extension 1002 (on  Server B).</li>
</ol>
<p>If  you&#8217;ve been able to do a 2 server setup, this type of setup should be  trivial for you. Remember, dundi.key and dundi.pub should be identical  on all three servers, so make sure you do that.</p>
<h2 id="head-44982927a1bf1725e08f407a6cb01b75eb837ad2">Adding  RealTime to it</h2>
<p>Yeah, having users hard coded in  sip.conf file is so so so uncool! Let&#8217;s have them in database. Of  course, for this to work you should have asterisk-addons installed on  Server A and Server B. Server C is just the lookup server, so we don&#8217;t  need anything there as far as asterisk is concerned.</p>
<h3 id="head-d062c65cba10f65b84a9ca90ce5c2cd7e9fd0666">Setting up  MySQL Server</h3>
<p>You need to have some  understanding of MySQL to continue. On a Debian/Ubuntu machine you can  install MySQL via</p>
<pre>apt-get install mysql-server
</pre>
<p>For our setup, we will install it on Server C as it is  sitting idle in any case, doing just the lookups. You can have a  dedicated machine for it depending on your requirements. Also, as JR  Richardson had mentioned in one of the documents, asterisk realtime does  a lot of database activity, so it is rather good to have it on other  server and it should go via a separate network interface which is not  being used for VOIP. Since usually all servers have atleast two ethernet  cards, it should be trivial. Think about it and implement as per your  requirements.</p>
<p>After  installation, comment out &#8220;bind-address&#8221; in /etc/mysql/my.cnf file and  then restart mysql through /etc/init.d/mysql restart. This is what I did  on the mysql server after connecting to it</p>
<pre>mysql&gt; create database asterisk;
mysql&gt; grant all privileges on asterisk.* to userA@192.168.1.5 identified by 'secretA';
mysql&gt; grant all privileges on asterisk.* to userB@192.168.1.6 identified by 'secretB';
</pre>
<p>I separated the user so that if in future I need to  identify which user is doing what, then it&#8217;s possible. Otherwise you can  have a single user, it&#8217;s much more convenient that way, specially when  you add more servers. You can also use &#8216;%&#8217; (quotes intended) instead of  IP Address so that anyone can connect to it.</p>
<p>Next import the database structure in which you&#8217;ll store  the users. You can copy paste the following directly into mysql prompt,  or save it as a file and import it later. This is copied directly from  asterisk source and is in the contrib/scripts/sip-friends.sql file. A  minor change you&#8217;d need is that &#8220;fullcontact&#8221; column should have a  varchar(128), otherwise asterisk would complain.</p>
<pre>CREATE TABLE `sipfriends` (
  `name` varchar(40) NOT NULL default '',
  `type` varchar(10) NOT NULL default '',
  `defaultuser` varchar(40),
  `fromuser` varchar(40),
  `fromdomain` varchar(40),
  `secret` varchar(40),
  `md5secret` varchar(40),
  `auth` varchar(10),
  `mailbox` varchar(20),
  `subscribemwi` varchar(10), -- yes/no
  `vmexten` varchar(20),
  `callerid` varchar(40),
  `cid_number` varchar(40),
  `callingpres` varchar(20),
  `usereqphone` varchar(10),
  `language` varchar(10),
  `incominglimit` varchar(10),
  `context` varchar(40) NOT NULL default '',
  `subscribecontext` varchar(40),
  `amaflags` varchar(20),
  `accountcode` varchar(20),
  `musicclass` varchar(20),
  `mohsuggest` varchar(20),
  `allowtransfer` varchar(20),
  `callgroup` varchar(20),
  `pickupgroup` varchar(20),
  `autoframing` varchar(10), -- yes/no
  `disallow` varchar(20) default 'all',
  `allow` varchar(20),
  `maxcallbitrate` varchar(15),
  `host` varchar(40) default 'dynamic',
  `outboundproxy` varchar(40),
  `ipaddr` varchar(20) NOT NULL default '',
  `defaultip` varchar(20),
  `port` int(6) NOT NULL default '0',
  `fullcontact` varchar(128),
  `insecure` varchar(20),
  `qualify` varchar(15),
  `regseconds` int(11) NOT NULL default '0',
  `regexten` varchar(20),
  `regserver` varchar(20),
  `rtptimeout` varchar(15),
  `rtpholdtimeout` varchar(15),
  `rtpkeepalive` varchar(15),
  `lastms` int(11) NOT NULL default '-1',
  `setvar` varchar(200),
  `useragent` varchar(50),
  PRIMARY KEY  (`name`),
  INDEX host (host, port),
  INDEX ipaddr (ipaddr, port)
) TYPE=MyISAM;
</pre>
<p>Last step &#8211; add two users into it, which will be our SIP  users.</p>
<pre>mysql&gt; insert into sipfriends set name='1001',type='friend',context='internal',host='dynamic',disallow='all',allow='gsm',qualify='yes';
mysql&gt; insert into sipfriends set name='1002',type='friend',context='internal',host='dynamic',disallow='all',allow='gsm',qualify='yes';
</pre>
<p>Let&#8217;s move on to other configurations.</p>
<h3 id="head-d2545468bfd5bac0bd22a423df4dfd8dcb332aea">Server A :  /etc/asterisk/res_mysql.conf</h3>
<p>The file contains the database  details</p>
<pre>[general]
dbhost = 192.168.1.10
dbname = asterisk
dbuser = userA
dbpass = secretA
dbport = 3306
requirements=warn
</pre>
<h3 id="head-b8116cba3c530a875b75978e0f06133cfbd38902">Server B :  /etc/asterisk/res_mysql.conf</h3>
<p>If you didn&#8217;t configure two  separate users in MySQL, then Server A&#8217;s values could be used. But since  in my setup each server has a separate user, therefore the following is  needed</p>
<pre>[general]
dbhost = 192.168.1.10
dbname = asterisk
dbuser = userB
dbpass = secretB
dbport = 3306
requirements=warn
</pre>
<h3 id="head-c6a887145e9254f1f12c337ebb34e6bd3b321198">Server A  &amp; B : /etc/asterisk/extconfig.conf</h3>
<p>Here&#8217;s what should be there in  the file on both the servers</p>
<pre>[settings]
sipusers =&gt; mysql,general,sipfriends
sippeers =&gt; mysql,general,sipfriends
</pre>
<p>Now we&#8217;ll remove the users in sip.conf files on both the  servers (1001 &amp; 1002). You may want to comment them out by  prefixing a semi-conon (;).</p>
<h3 id="head-068c3c7123a67d7b34b074286df72b201b0c9c3b">Server A  &amp; B : /etc/asterisk/sip.conf</h3>
<p>We&#8217;ll just remove the sip user  entries (of 1001 &amp; 1002) in sip.conf file as it&#8217;s no longer needed.  And we&#8217;ll add one parameter &#8220;rtcachefriends&#8221; in the general context so  that users registered in real time are cached by sip and thus  qualify=yes works for them. You may omit it as per your requirements.</p>
<pre>[general]
regcontext=dundiextens
srvlookup=no
NAT=yes
bindport=5060
allowguest=no
canreinvite=no
rtcachefriends=yes
</pre>
<h3>Testing RealTime  Setup</h3>
<ol type="1">
<li>Unregister the phones from  Zoiper.</li>
<li>Restart asterisk and then open the consoles of Server A  &amp; Server B.
<pre>/etc/init.d/asterisk restart
asterisk -r
</pre>
</li>
<li>On Server C&#8217;s mysql prompt, if  you enter &#8220;show processlist&#8221;, you will two persistent connections from  both the servers. All&#8217;s good to go.</li>
<li>Now  try registering the phones. It should register. Server A&#8217;s asterisk  console should print out something similar to the following
<pre>CLI&gt; sip show peers
Name/username              Host            Dyn Nat ACL Port     Status       Realtime
1001/1001                  xx.xx.xx.xx     D   N       5060     OK (122 ms)  Cached RT
priv                       192.168.1.6         N       5060     Unmonitored
2 sip peers [Monitored: 1 online, 0 offline Unmonitored: 1 online, 0 offline]
CLI&gt;
</pre>
</li>
<li>Let&#8217;s try calling extension 1001  now from Server B selected in Zoiper.</li>
<li>It should playback the congratulations  message that we&#8217;d defined in extensions.conf.</li>
</ol>
<h2 id="head-840b0f4e741bc37eb0367a45219bd084d1cd2ed3">What&#8217;s next</h2>
<h3 id="head-9186a87a80a88885c2f5923e5f30a967d9259d43">Enabling  actual calling out</h3>
<p>Till now we had just used  playback. If you intend to actually call out the users, which of course  you&#8217;d want to do, then do the following.</p>
<p>/etc/asterisk/extensions.conf</p>
<pre>[general]
static=yes
writeprotect=no
autofallthrough=no
clearglobalvars=no
priorityjumping=no

[lookupdundi]
switch =&gt; DUNDi/priv

[internal]
exten =&gt; 123,1,Playback(demo-congrats)
exten =&gt; 123,n,Hangup()

include =&gt; dundiextens

exten =&gt; _XXXX,2,NoOp(internal context called on Server A to ${EXTEN})
exten =&gt; _XXXX,n,Dial(SIP/${EXTEN},10)
exten =&gt; _XXXX,n,Hangup()

include =&gt; lookupdundi

[incomingdundi]
exten =&gt; _XXXX,1,NoOp(Landed on Server A ${EXTEN})
exten =&gt; _XXXX,n,Goto(internal,${EXTEN},2)
</pre>
<p>If you notice, I&#8217;ve included &#8220;dundiextens&#8221; in the  &#8220;internal&#8221; context. This would allow you to call users who are  registered on the same server as yours. If they&#8217;re not registered, then  &#8220;lookupdundi&#8221; would be called. The SIP extension if found would ring for  10 seconds unless answered, and then hangup would be called. This is  very very basic, but it should give you an idea where to start.</p>
<h3 id="head-4265c529ce8bd1922cfab314a17f119d53ff3dd2">Using  extensions in RealTime</h3>
<p>If you plan  to use extensions also in RealTime instead of hard coding them, such as  for IVR, Voicemail etc. Then the following should work. I would prefer  that you don&#8217;t put the user extension information in there, but rather  use it as a replacement for extension 456 or extension 123 that we  created above.</p>
<p>In database,  the table structure would be</p>
<pre>CREATE TABLE `extensions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `context` varchar(20) NOT NULL DEFAULT '',
  `exten` varchar(20) NOT NULL DEFAULT '',
  `priority` tinyint(4) NOT NULL DEFAULT '0',
  `app` varchar(20) NOT NULL DEFAULT '',
  `appdata` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`context`,`exten`,`priority`),
  KEY `id` (`id`)
) ENGINE=MyISAM;
</pre>
<p>In /etc/asterisk/extconfig.conf you will add</p>
<pre>extensions =&gt; mysql,general,extensions
</pre>
<p>In /etc/asterisk/extensions.conf, in &#8220;internal&#8221; context  you will add</p>
<pre>switch =&gt; Realtime
</pre>
<p>As an example, let&#8217;s insert an Echo() application as  extension 100. Enter the following information in the database</p>
<pre>mysql&gt; insert into extensions set context='internal',exten='100',priority='1',app='Playback',appdata='demo-echotest';
mysql&gt; insert into extensions set context='internal',exten='100',priority='2',app='Echo',appdata='';
</pre>
<p>Restart asterisk and then try dialing out extension 100  from either Server A or B. One thing to note is that we are restarting  only because we&#8217;ve made significant changes in the configuration. The  best part of RealTime is that you don&#8217;t need to restart any of the  services if new SIP users are added, or new extensions are added.</p>
<h3 id="head-bc9e3c77246fd71804358eb4703fb47b1178afcd">Securing the  setup</h3>
<ol type="1">
<li>Secure the  SIP users. In the database, put some value for &#8220;secret&#8221; column.</li>
<li>Put firewall on your  servers. You need to open ports for SIP, for RTP and DUNDi. Here&#8217;s a  sample configuration
<pre># For IAX
$IPTABLES -A INPUT -p tcp --dport 4569 -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 4569 -j ACCEPT
# For DUNDi
$IPTABLES -A INPUT -p tcp --dport 4520 -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 4520 -j ACCEPT
# For SIP
$IPTABLES -A INPUT -p udp --dport 5060 -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 5070 -j ACCEPT # In case bindport is different
# For SIP RTP
$IPTABLES -A INPUT -p udp --dport 10000:20000 -m udp -j ACCEPT

# In case bindport is different in sip.conf then you can do a bit of port forwarding
$IPTABLES -A PREROUTING -t nat -p udp --dport 5060 -j DNAT --to xxx.xxx.xxx.xxx:5070
</pre>
</li>
</ol>
<h3 id="head-9f80c3f811fb22e0d8c1b1c9e3cdfec52038ae0a">Do load  balancing &amp; fail over</h3>
<ul>
<li>Round Robin DNS for  poor man&#8217;s load balancing. This means having two (or more) &#8220;A&#8221; records  for your domain. The softphone would connect randomly to any. No failure  can be detected in this scenario, but still you can maintain uptime by  using linux-ha (high availability)</li>
<li>DNS SRV for load balancing as well as failover. Zoiper  supports DNS SRV and it&#8217;s not that difficult to implement. All you need  is a few SRV records in your DNS Server, and that&#8217;s pretty easy via  GoDaddy&#8217;s DNS. You can assign weight to each server as well as port  numbers, and the softphone would automatically connect to another server  in case the one it&#8217;s connected with goes down.</li>
<li>GeoDNS in case you are having users  spread across the globe. Have multiple registration servers spread all  over the world and use GeoDNS to make the user register to the ones  closest to them.</li>
<li>Have multiple dundi lookup servers in case dundi lookup  server itself goes down. Recommended is a High Availability scenario (ha  &#8211; <a href="http://linux-ha.org/">http://linux-ha.org/</a>)</li>
<li>MySQL Cluster  setup for database. So you&#8217;ll have high uptime.</li>
<li>Master Slave/Replication configuration of  MySQL for better performance. JR Richardson mentioned somewhere that we  can have multiple MySQL servers running &#8211; the data is read from one  database and written to another. This way we can have faster and  localized reads in case the servers are geographically apart.</li>
</ul>
<p>Hope  this serves a good purpose for you. Any comments or questions are  welcome.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=74&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2010/07/03/asterisk-basics-and-load-balancing-via-dundi/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://exain.files.wordpress.com/2010/07/zoiperscreen01.png" medium="image">
			<media:title type="html">Zoiper Screenshot for DUNDi</media:title>
		</media:content>
	</item>
		<item>
		<title>Board800 now on Twitter!</title>
		<link>http://exain.wordpress.com/2010/04/03/board800-now-on-twitter/</link>
		<comments>http://exain.wordpress.com/2010/04/03/board800-now-on-twitter/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 16:55:44 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[board800]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/2010/04/03/board800-now-on-twitter/</guid>
		<description><![CDATA[Now also get updates of Board800 on Twitter<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=64&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now also get updates of <a title="Follow board800 on twitter" href="http://twitter.com/board800">Board800</a> on Twitter</p>
<p><a href="http://twitter.com/board800"><img class="alignnone" title="Board800 on Twitter" src="http://board800.com/images/twitter.png" alt="Board800 on Twitter" width="100" height="37" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=64&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2010/04/03/board800-now-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://board800.com/images/twitter.png" medium="image">
			<media:title type="html">Board800 on Twitter</media:title>
		</media:content>
	</item>
		<item>
		<title>Board800 &#8211; My first Flex and Red5 Application</title>
		<link>http://exain.wordpress.com/2010/03/10/board800-my-first-flex-and-red5-application/</link>
		<comments>http://exain.wordpress.com/2010/03/10/board800-my-first-flex-and-red5-application/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 16:47:24 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[board800]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[interactive whiteboard]]></category>
		<category><![CDATA[multiuser whiteboard]]></category>
		<category><![CDATA[red5]]></category>
		<category><![CDATA[whiteboard]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=58</guid>
		<description><![CDATA[A few months back I was not even aware that it was now possible to do Adobe Flex development on Linux. Adobe has made the Flex SDK freely available, and Red5 is the media server which can easily integrate with a Flex application. The possibilities are endless, and I personally feel that this is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=58&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few months back I was not even aware that it was now possible to do Adobe Flex development on Linux. Adobe has made the Flex SDK freely available, and Red5 is the media server which can easily integrate with a Flex application.</p>
<p>The possibilities are endless, and I personally feel that this is the way future applications would be developed. What I thought Java Web Start could have achieved (had it been a bit faster and the plugin etc. didn&#8217;t involve huge download and cumbersome installation), now I see that in Adobe Flex.</p>
<p>Regardless, I spent last few months working on a Flex application, and it has now culminated into what I&#8217;ve named as Board800 (<a href="http://www.board800.com">http://www.board800.com</a>). It is an interactive multi-user whiteboard application, on the lines of Dabbleboard, though much simpler. You can use it to collaborate with other users, and also *purchase* it if you wish to deploy it on your own servers. Go check it out now! <a href="http://www.board800.com">http://www.board800.com</a></p>
<p><a href="http://www.board800.com"></a><a href="http://www.board800.com"><img class="aligncenter size-full wp-image-59" title="board800" src="http://exain.files.wordpress.com/2010/03/board800.png?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=58&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2010/03/10/board800-my-first-flex-and-red5-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://exain.files.wordpress.com/2010/03/board800.png" medium="image">
			<media:title type="html">board800</media:title>
		</media:content>
	</item>
		<item>
		<title>WikiReader &#8211; End of the World doesn&#8217;t scare me now!</title>
		<link>http://exain.wordpress.com/2010/02/22/wikireader-end-of-the-world-doesnt-scare-me-now/</link>
		<comments>http://exain.wordpress.com/2010/02/22/wikireader-end-of-the-world-doesnt-scare-me-now/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 12:32:45 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[end of the world]]></category>
		<category><![CDATA[EoW]]></category>
		<category><![CDATA[wikipedia]]></category>
		<category><![CDATA[wikireader]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=55</guid>
		<description><![CDATA[I got my shiny new WikiReader. For the uninitiated, it&#8217;s the entire Wikipedia (well, atleast the textual content of entire Wikipedia in English language) stored on a memory card (MicroSD), and visible from inside a touch screen device. http://thewikireader.com/ I have always been fond of encyclopedias &#8211; when I was a kid, I loved the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=55&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got my shiny new WikiReader. For the uninitiated, it&#8217;s the entire Wikipedia (well, atleast the textual content of entire Wikipedia in English language) stored on a memory card (MicroSD), and visible from inside a touch screen device.</p>
<p><a title="WikiReader - Wikipedia in your pocket" href="http://thewikireader.com"><strong>http://thewikireader.com/</strong></a></p>
<p>I have always been fond of encyclopedias &#8211; when I was a kid, I loved the World Books, then when I grew up and got familiar with computers, had heard of Microsoft Encarta &#8211; but I think since childhood I wasn&#8217;t a big fan of MS, so went ahead and bought IBM Worldbook CDs. It was amazing, and helped much in the school projects.</p>
<p>Now, at this date, I&#8217;ll admit I am getting a lot paranoid. That is more related paranoia associated with 2012, End of the World and what not. I have always believed in stuff which is WITH YOU and in your reach WHEN YOU WANT. Internet is something which scares me &#8211; a lot of stuff I &#8220;need&#8221;, which is there, but as soon as you get offline, all&#8217;s gone (well, this scare has prompted me to setup 3 different ISP connections at my home, apart from the mobile wireless internet). I don&#8217;t want that. I had been attempting to understand and planning that I&#8221;ll download the entire Wikipedia some day, and set up on my machine so that I can access it offline. Well, it would have been cumbersome and real painful. I couldn&#8217;t believe when I read about WikiReader, and I realized that&#8217;s the device I need (originally I&#8217;d been reading about <a title="Openmoko" href="http://wiki.openmoko.org">Openmoko</a> and <a title="New FreeRunner" href="http://wiki.openmoko.org/wiki/Neo_FreeRunner">FreeRunner</a>). So, I found out the dealers in India (<a title="IDA Systems - WikiReader and FreeRunner" href="http://www.idasystems.net/">IDA Systems</a>), and immediately placed the order.</p>
<p>I have been so happy with the purchase that now I can concentrate on the other survival tactics for EoW <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  I don&#8217;t think anyone wouldn&#8217;t want knowledge at their fingertips, in such a convenient and cheap manner. If you don&#8217;t have WikiReader, then I think you&#8217;re missing out on a lot of stuff that you could&#8217;ve learnt.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=55&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2010/02/22/wikireader-end-of-the-world-doesnt-scare-me-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Phillipe Starck &#8211; angle of vision</title>
		<link>http://exain.wordpress.com/2009/12/30/phillipe-starck-angle-of-vision/</link>
		<comments>http://exain.wordpress.com/2009/12/30/phillipe-starck-angle-of-vision/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 08:57:59 +0000</pubDate>
		<dc:creator>Vivek Kapoor</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[phillipe starck]]></category>

		<guid isPermaLink="false">http://exain.wordpress.com/?p=52</guid>
		<description><![CDATA[I saw a post about Philippe Starck on raising the angle of vision at http://deepikadutta.wordpress.com/2009/03/15/designers-raise-the-angle-of-vision/ MUST SEE! &#8211; check out the &#8220;catch&#8221; while raising your angle of vision<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=52&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I saw a post about Philippe Starck on raising the angle of vision at<a href="http://deepikadutta.wordpress.com/2009/03/15/designers-raise-the-angle-of-vision/"> http://deepikadutta.wordpress.com/2009/03/15/designers-raise-the-angle-of-vision/</a></p>
<p>MUST SEE! &#8211; check out the &#8220;catch&#8221; while raising your angle of vision <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/exain.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/exain.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/exain.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/exain.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/exain.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/exain.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/exain.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/exain.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=exain.wordpress.com&amp;blog=2191018&amp;post=52&amp;subd=exain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://exain.wordpress.com/2009/12/30/phillipe-starck-angle-of-vision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1739fc60506b838306ac94d040f9f41f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
	</channel>
</rss>
