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

<channel>
	<title>The Nir Simionovich blog &#187; php</title>
	<atom:link href="http://www.simionovich.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simionovich.com</link>
	<description>The rants and raves of a technogeek</description>
	<lastBuildDate>Sat, 03 Sep 2011 19:26:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Asterisk and Amazon EC2 &#8211; Amoocon Presentation</title>
		<link>http://www.simionovich.com/2009/05/14/asterisk-and-amazon-ec2-amoocon-presentation/</link>
		<comments>http://www.simionovich.com/2009/05/14/asterisk-and-amazon-ec2-amoocon-presentation/#comments</comments>
		<pubDate>Wed, 13 May 2009 22:57:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[AGI]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Dialers]]></category>
		<category><![CDATA[economy]]></category>
		<category><![CDATA[GreenfieldTech]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHPAGI]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMWARE]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=301</guid>
		<description><![CDATA[I recently gave a presentation at the Amoocon convention, held in Rostock, Germany &#8211; about Asterisk and Amazon EC2. Below is a medium quality video of that presentation: or you may download it here: Amazon EC2 and Asterisk video files]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2009%2F05%2F14%2Fasterisk-and-amazon-ec2-amoocon-presentation%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2009%2F05%2F14%2Fasterisk-and-amazon-ec2-amoocon-presentation%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I recently gave a presentation at the Amoocon convention, held in Rostock, Germany &#8211; about Asterisk and Amazon EC2. Below is a medium quality video of that presentation:</p>
<p> <embed src="http://www.amoocon.de/assets/talks/27/EC2-medium.mov" width="480" height="284" href="http://www.amoocon.de/assets/talks/27/EC2-medium.mov" autohref="false">  </p>
<p>or you may download it here:<br />
<a href="http://www.amoocon.de/talks/27">Amazon EC2 and Asterisk video files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2009/05/14/asterisk-and-amazon-ec2-amoocon-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.amoocon.de/assets/talks/27/EC2-medium.mov" length="201098713" type="video/quicktime" />
		</item>
		<item>
		<title>Asterisk AGI Programming &#8211; New Book</title>
		<link>http://www.simionovich.com/2009/02/18/asterisk-agi-programming-new-book/</link>
		<comments>http://www.simionovich.com/2009/02/18/asterisk-agi-programming-new-book/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 23:08:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AGI]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Asterisk Book]]></category>
		<category><![CDATA[Asterisk Developers]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Packt Publishing]]></category>
		<category><![CDATA[PHPAGI]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=254</guid>
		<description><![CDATA[Well, it&#8217;s finally out &#8211; my new book that is Some of you already know, but over the past year I&#8217;ve been busy writing a new book. This time it&#8217;s a book for Asterisk developers, especially tailored to PHP developers wishing to utilizing the PHPAGI framework. The book is out from Packt Publishing (Like my]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2009%2F02%2F18%2Fasterisk-agi-programming-new-book%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2009%2F02%2F18%2Fasterisk-agi-programming-new-book%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Well, it&#8217;s finally out &#8211; my new book that is <img src='http://www.simionovich.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Some of you already know, but over the past year I&#8217;ve been busy writing a new book. This time it&#8217;s a book for Asterisk developers, especially tailored to PHP developers wishing to utilizing the PHPAGI framework. The book is out from Packt Publishing (Like my old AsteriskNOW book) and is updated with all the recent changes in Asterisk &#8211; including version 1.6.X and DAHDI.</p>
<div class="wp-caption aligncenter" style="width: 550px"><a href="http://www.packtpub.com/asterisk-gateway-interface-programming/book"><img title="Asterisk Developers Book" src="http://images.packtpub.com/images/full/184719446X.jpg" alt="Asterisk Developers Book" width="540" height="666" /></a><p class="wp-caption-text">Asterisk Developers Book</p></div>
<p>If you like my work with Asterisk and would like to read more of my work, go ahead and get an electronic version of this book. I know it&#8217;s a little self promoting, by hey, it never hurts does it?</p>
<p>I&#8217;ve included a chapter on how to build a complete project from scratch, detailing the various analysis steps and various paradigms required to develop a fully functional Asterisk based application. I believe that even experienced Asterisk developers will benefit from this book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2009/02/18/asterisk-agi-programming-new-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source has bad reputation in Israel!</title>
		<link>http://www.simionovich.com/2008/12/28/open-source-has-bad-reputation-in-israel/</link>
		<comments>http://www.simionovich.com/2008/12/28/open-source-has-bad-reputation-in-israel/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 11:45:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Asterisk At Home]]></category>
		<category><![CDATA[FreePBX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PBX-in-a-flash]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[TrixBox]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=184</guid>
		<description><![CDATA[The Open Source movement had been in existence since the 60&#8242;s, and we can surely find its roots somewhere along the hippie culture and movement. While Free-Love had transcended to Free-Code, or to be more exact &#8211; Free-Knowledge, the question of the sources for your Open Source is still questionable. Comparing it with the Sixties,]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F12%2F28%2Fopen-source-has-bad-reputation-in-israel%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F12%2F28%2Fopen-source-has-bad-reputation-in-israel%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>The Open Source movement had been in existence since the 60&#8242;s, and we can surely find its roots somewhere along the hippie culture and movement. While Free-Love had transcended to Free-Code, or to be more exact &#8211; Free-Knowledge, the question of the sources for your Open Source is still questionable. Comparing it with the Sixties, it&#8217;s easy to compare the various &#8220;Free-Love&#8221; movements with the various &#8220;Open Source Paradigms&#8221; of today. While GPL, BSD, MPL, ZPL and others preach for Open Source adaptation &#8211; each one took a different path.</p>
<p>While the paths differ, but the end result is more or less the same, all suffer from a serious lack &#8211; a bad reputation. While in the early 2000, Open Source usually meant &#8211; highly stable, state of the art technology, increased ROI, lowered TCO and most importantly for many &#8211; COOL. Coming 2008, Open Source is starting to get a bad rep, due to the ever increasing simplicity of entering the Open Source world.</p>
<p>I started using Linux somewhere around 1994. My first Linux distribution was a Slackware, with a kernel of 1.0.28 &#8211; I needed 99 floppy disks in order to install the system, and it took me a few hours to do so. However, I can&#8217;t forget my amazement at seeing the X-Windows environment booting up, and more than that, being completely overwhelmed with the fact that I have a fully functional UNIX environment in my house, just like the one I had in my Army office. Now, I basically had no one to teach me this new environment, so, I had to take my UNIX skills (Solaris and AIX) and adopt to Slackware Linux &#8211; it took me a few weeks to get around, but I got around and stuck to it ever since.</p>
<p>Now, let&#8217;s jump 14 years forward in time. The year is 2008, a graphic based environment for Linux is no longer a myth and it is getting better and better by the day. People are starting to adopt Linux beyond the academic and the ISP market sectors, slowly integrating Linux based distributions (Mandriva, Ubutnu) on to their desktops and notebooks. Linux is become simple and appealing to everybody.</p>
<p>When something becomes easy to use, people make good use of it &#8211; a good example is the Asterisk project. Projects such as TrixBox (AKA: AsteriskAtHome), PBXinaFlash, AsteriskNOW and others had made Asterisk into a simple installation product, that can be installed and managed by any half-decent sysadmin. Problem is, while a half-decent sysadmin will do a fair job of maintaining the system, a shitty sysadmin will crap everything to hell. But hell, that is true for almost anything related to computers or technology &#8211; there&#8217;s nothing new here! Well, there is nothing new and everything is now new. People who were more or less selling shoes 3 years, then 2 years decided to sell ISP routers, then a year ago started selling IP phones, are now selling Asterisk based systems &#8211; using these distibutions, while having no idea what they are selling or promoting. For these people, Asterisk is nothing more beyond FreePBX &#8211; once encountering deeper issues, will simply abandon the customer &#8211; leaving the Open Source product with a bad rap with the, now disappointed, customer.</p>
<p>I want to believe that other places in the world are different, I want to believe that Israel will reach a point in time when this doesn&#8217;t happen &#8211; however, I guess that only time will tell and I surely hope this will change in Israel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2008/12/28/open-source-has-bad-reputation-in-israel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A2Billing+Apache vs. A2Billing+Lighttpd</title>
		<link>http://www.simionovich.com/2008/10/14/a2billingapache-vs-a2billinglighttpd/</link>
		<comments>http://www.simionovich.com/2008/10/14/a2billingapache-vs-a2billinglighttpd/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 04:51:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AGI]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[A2Billing]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[errord]]></category>
		<category><![CDATA[FreePBX]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=108</guid>
		<description><![CDATA[Ok, it goes without saying: &#8220;A2Billing is one of the most complete Calling Card systems in the Asterisk market today.&#8221; &#8211; on the other hand, it is also true that: &#8220;A2Billing is one of the most complex and convoluted pieces of code ever written!&#8221;. The combination of the above makes for a fairly combustible mixture,]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F10%2F14%2Fa2billingapache-vs-a2billinglighttpd%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F10%2F14%2Fa2billingapache-vs-a2billinglighttpd%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Ok, it goes without saying: &#8220;A2Billing is one of the most complete Calling Card systems in the Asterisk market today.&#8221; &#8211; on the other hand, it is also true that: &#8220;A2Billing is one of the most complex and convoluted pieces of code ever written!&#8221;.</p>
<p>The combination of the above makes for a fairly combustible mixture, especially if you have a big system. Now, I recently ran into an issue, where PHP was litterally eating up almost 512MB of ram, in order to run the A2Billing reports. In it self, that didn&#8217;t make much sense to me. However, after inspecting the code, and realizing that A2Billing uses GD in run-time to generate images out of thousands of CDR records, it made perfect sense that it may just be eating up memory.</p>
<p>So, increasing the memory on PHP to go up to 512MB of RAM helps, but creates an interesting probelm. Whenever Apache will invoke a script, it will automatically consume a shitload of RAM, and for each time I intiate a new query, it will spawn a new Apache instance, and consume the same amount of memory. That said, after 6 queries of 512MB, about 50% of the machines RAM was already eaten up &#8211; and Apache will not free it!</p>
<p>At this point, I had 2 choices:</p>
<ol>
<li>Go into the A2Billing code, change the GD code to work right or simply change it completely to something else (maybe flash).</li>
<li>Work around the problem with a mix of proper IT practices.</li>
</ol>
<p>I admit that I hate quite a lot of things (I won&#8217;t list these here); however; nothing ranks up the list as modifying someone elses code, when I know for fact that it will be unmaintainable in the future. So, I choose option number 2.</p>
<p>I&#8217;ve being playing alot with Lighttpd lately, and got some really nice performance from it. So, I said to myself, this would be a great test to see if Lighttpd+FastCGI can solve the problem here. I had to work my way around lighttpd to do what I wanted and verify that my FastCGI server in Lighttpd doesn&#8217;t consume all memory, however, here is what I got working with A2Billing, and really nice.</p>
<p>Step 1: Enable the required modules:</p>
<pre>server.modules              = (</pre>
<pre>                               "mod_access",</pre>
<pre>                               "mod_auth",</pre>
<pre>                               "mod_status",</pre>
<pre>                               "mod_fastcgi",</pre>
<pre>                               "mod_accesslog" )</pre>
<p>Step 2: Enable the FastCGI Server</p>
<pre>fastcgi.server             = ( ".php" =&gt;</pre>
<pre>                               ( "localhost" =&gt;</pre>
<pre>                                 (</pre>
<pre>                                   "socket" =&gt; "/var/run/lighttpd/php-fastcgi.socket",</pre>
<pre>                                   "bin-path" =&gt; "/usr/bin/php-cgi",</pre>
<pre>                                   "idle-timeout" =&gt; 30,</pre>
<pre>                                   "max-procs" =&gt; 1,</pre>
<pre>                                   "min-procs" =&gt; 1</pre>
<pre>                                 )</pre>
<pre>                               )</pre>
<pre>                            )</pre>
<p>Step 3: Modify user permissions (required if you are using FreePBX)</p>
<pre>server.username            = "asterisk"</pre>
<pre>server.groupname           = "asterisk"</pre>
<p>Step 4: Setup authentication and authorization (optional)</p>
<pre>#### auth module</pre>
<pre>## read authentication.txt for more info</pre>
<pre>auth.backend               = "htpasswd"</pre>
<pre>auth.backend.htpasswd.userfile = "/var/www/.htpasswd"</pre>
<pre>auth.require               = ( "/" =&gt;</pre>
<pre>                               (</pre>
<pre>                                 "method"  =&gt; "basic",</pre>
<pre>                                 "realm"   =&gt; "A2Billing Management",</pre>
<pre>                                 "require" =&gt; "valid-user"</pre>
<pre>                               )</pre>
<pre>                             )</pre>
<p>The above configuration made the interface spwan a single FastCGI, insuring that memory usage is never over utilized. I still need 512MB of RAM to run the scripts, but at least now it&#8217;s limited to only 512MB of RAM, out of a machine that has 16GB of RAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2008/10/14/a2billingapache-vs-a2billinglighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache vs. Lighttpd (AKA: Lighty)</title>
		<link>http://www.simionovich.com/2008/08/27/apache-vs-lighttpd-aka-lighty/</link>
		<comments>http://www.simionovich.com/2008/08/27/apache-vs-lighttpd-aka-lighty/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 11:21:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AGI]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[SIP]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Ajaz]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[dialer]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=55</guid>
		<description><![CDATA[For a while now I&#8217;ve been toying around with the idea of utilizing Lighttpd for various web based applications. One of these application is my Automatic Dialer framework, also known as the GTD-API. The main issue with the GTD-API (besides that it is highly reliant on a MySQL database), is the fact that all requests]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F08%2F27%2Fapache-vs-lighttpd-aka-lighty%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F08%2F27%2Fapache-vs-lighttpd-aka-lighty%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>For a while now I&#8217;ve been toying around with the idea of utilizing Lighttpd for various web based applications. One of these application is my Automatic Dialer framework, also known as the GTD-API. The main issue with the GTD-API (besides that it is highly reliant on a MySQL database), is the fact that all requests have to be processed via XML-RPC HTTP post requests.</p>
<p>The main issue that I had was this: in a production scenario, a dialer management system will generate over 100 requests to the XML-RPC server. While Apache is fully capable of rendering services at such a speed, its increasing size and boilerplate automatically introduce a management issue. In addition, as I was trying to build a dialer appliance that can be used in any enterprise, the ever expanding Apache wasn&#8217;t a good choice.</p>
<p>While I was looking at both NginX and Lighttpd, the latter captured my eye, thanks to a simple advantage &#8211; The integration of FastCGI based PHP was so easy, that it almost troubling that I used Apache all these years.</p>
<p>At this point, once I got Lighhtpd working with my Dialer, I said to myself: &#8220;It would be really cool to go about and send status reports back from the dialer, directly to the web client activating the call. In addition, I really don&#8217;t want to go about and perform these updates to the database, then query the database &#8211; that would, literally, kill the MySQL server.</p>
<p>So, I implemented a local session storage area for each call, which updated the call status as it traverses. The information was stored on the hard drive, which allowed a better response time than the ever indexing MySQL server. The status reports were picked up from the Lighttpd server via an Ajax client (which I didn&#8217;t write &#8211; I suck at JS) &#8211; and it works quite well.</p>
<p>I wonder, can Lighttpd completely replace Apache? &#8230; time will tell&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2008/08/27/apache-vs-lighttpd-aka-lighty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m no web designer &#8211; I&#8217;m a developer</title>
		<link>http://www.simionovich.com/2008/08/10/im-no-web-designer-im-a-developer/</link>
		<comments>http://www.simionovich.com/2008/08/10/im-no-web-designer-im-a-developer/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 09:28:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GPL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Code Igniter]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=28</guid>
		<description><![CDATA[Lets put it this way: I am no web developer, nor was I ever, nor will I ever be. While I do enjoy playing around with various web designs and web technologies, I&#8217;m no web developer. Think about it, this blog is based upon the WordPress system, which means, that while I could easily build]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F08%2F10%2Fim-no-web-designer-im-a-developer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F08%2F10%2Fim-no-web-designer-im-a-developer%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Lets put it this way: I am no web developer, nor was I ever, nor will I ever be. While I do enjoy playing around with various web designs and web technologies, I&#8217;m no web developer. Think about it, this blog is based upon the WordPress system, which means, that while I could easily build my own blog system &#8211; I didn&#8217;t.As most developers are, I am a lazy person &#8211; when it comes to writing code, that is. This means that when I write an application, I really like spending my time working on the application logic, rather than wasting my time on GUI. I&#8217;ve always looked for better ways to improve my applications development track, especially, the ability to seperate the logic from the display in such a way that both become agnostic to one another. So, I started looking into various MVC (Model-View-Controller) frameworks &#8211; which had been springing up all over the past year.</p>
<p>While the most popular one seems to be Ruby-On-Rails, I don&#8217;t like Ruby and prefare PHP. Various options exist here, so I seeked one that was easy to integrate and that is backed by a company of some sort.</p>
<h2><strong>Zend Framework</strong></h2>
<p>Much like PHP, Zend Framework appears to be a mixture of functions, closely wrapped into a set of classes, to help you create an MVC environment. I&#8217;ve started learning it, and shortly came to a conclusion: much like PHP, Zend Framework enables you a feature rich environment, however, it isn&#8217;t always clear how to get to do something with it.</p>
<h2>CakePHP</h2>
<p>CakePHP appears to be a slightly more rigid PHP MVC environment, with a fairly vibrant and lively community backing it up. However, like any other young community backed project, it lacks one main element: proper documentation. The documents available on the CakePHP.org website are sketchy at best, which means, there is no ordered manner of getting started fast with CakePHP.</p>
<h2>Code Igniter</h2>
<p>Code Igniter is a PHP MVC environment, backed by Ellis Labs &#8211; the same people behing Expression Engine. So, from a technical point of view, this is a plus, as Ellis Labs had made it its business to make Code Igniter a valid product. The amount of information available on the Internet is satisfactory, and the documentation on the website is more than good &#8211; it&#8217;s down right GREAT! The addition of video tutorials with a very clear naration enables even a novice developer to go about and start working fast with Code Igniter. The one thing that Code Igniter lacks is a rigid framework, which means, that just like PHP &#8211; it&#8217;s easy to fuck about and mess things up.</p>
<h2>My Choice</h2>
<p>Currently, I use a mixture of Code Igniter + Prototype + XAJAX to build my web applications, which makes for a fairly rapid development environment &#8211; I&#8217;d love to hear what you have to say about these.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2008/08/10/im-no-web-designer-im-a-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working on a new book &#8230;.</title>
		<link>http://www.simionovich.com/2008/08/05/working-on-a-new-book/</link>
		<comments>http://www.simionovich.com/2008/08/05/working-on-a-new-book/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 11:14:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AGI]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[AsteriskNOW]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[CTI]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PacktPublishing]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=52</guid>
		<description><![CDATA[As most of you reading this blog, you must know that I&#8217;ve published an AsteriskNOW book early this year. I&#8217;m happy to say that I&#8217;ve received numerous emails since the publication of the book, all asking various questions about Asterisk in general and AsteriskNOW in particular. Most of the questions that I received were related]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F08%2F05%2Fworking-on-a-new-book%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F08%2F05%2Fworking-on-a-new-book%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>As most of you reading this blog, you must know that I&#8217;ve published an <a href="http://www.asterisknow.org">AsteriskNOW</a> <a href="http://www.amazon.com/AsteriskNOW-Nir-Simionovich/dp/1847192882/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1217936695&#038;sr=1-1">book</a> early this year. I&#8217;m happy to say that I&#8217;ve received numerous emails since the publication of the book, all asking various questions about Asterisk in general and AsteriskNOW in particular.</p>
<p>Most of the questions that I received were related to the development of AGI and AMI scripts, and how to utilize Asterisk as an application layer platform. This inspired me to work on additonal title, to complete my previous book. I&#8217;m currently working on an Asterisk Developers guide, for AGI/CTI development with Asterisk. The book serves as a complete guide, summarizing the various aspects of developing AGI/CTI applications with Asterisk, while, enjoying various additions from my day-to-day experience with AGI/CTI development with Asterisk. The book is written as an eye-opener for experienced developers, wishing to make their transition to AGI/CTI development, and teaches them how to avoid the most common mistakes of early day AGI developers.</p>
<p>I&#8217;ll be be updating the blog with my progress. Currently, chapters 1 through 5 are complete, covering the basic aspects of dial-plan and AGI development. More information will be released soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2008/08/05/working-on-a-new-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The world&#8217;s fastest Asterisk based Dialer</title>
		<link>http://www.simionovich.com/2008/03/02/the-worlds-fastest-asterisk-based-dialer/</link>
		<comments>http://www.simionovich.com/2008/03/02/the-worlds-fastest-asterisk-based-dialer/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 09:23:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AGI]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[SIP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[advertizing]]></category>
		<category><![CDATA[ami]]></category>
		<category><![CDATA[dialer]]></category>
		<category><![CDATA[digium]]></category>
		<category><![CDATA[freeswitch]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[openpbx]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[sangoma]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=26</guid>
		<description><![CDATA[As most of you already know, I&#8217;m heavily involved within the Asterisk Open PBX project. Over the course of the past 5 years of my dealing with Asterisk, Asterisk had always suffered a serious flaw, and that is, a single-threaded Manager interface &#8211; which usually led to serious dead-locks when writing a multi-threaded server that]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F03%2F02%2Fthe-worlds-fastest-asterisk-based-dialer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2008%2F03%2F02%2Fthe-worlds-fastest-asterisk-based-dialer%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>As most of you already know, I&#8217;m heavily involved within the Asterisk Open PBX project. Over the course of the past 5 years of my dealing with Asterisk, Asterisk had always suffered a serious flaw, and that is, a single-threaded Manager interface &#8211; which usually led to serious dead-locks when writing a multi-threaded server that connects to it.</p>
<p>One of my long time challenges was to surpass the 4-5 originate requests to the Asterisk Manager interface, enabling me to automatically dial more than 4-5 calls at the same second. My initial work had began with the idea of increasing that by a factor of 50%, going up to around 7-8 calls per second &#8211; I had achieved that using a combination of smart synchronization between the manager interface and my originating server &#8211; and also enabling asynchronous originate requests &#8211; however, that methodology had proved to be problematic &#8211; in terms of reliability.</p>
<p>I understood that something else had to be devised, something that doesn&#8217;t rely completely on the manager interface, and that will allow me to originate calls freely, without clogging up the manager interface. So, I decided to move my interest from the Manager interface, and concentrate on understanding Asterisk&#8217;s channel handling, especially, how do calls originating from the manager interface are handled by the Asterisk spooler and the Asterisk channel drivers.</p>
<p>more will follow&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2008/03/02/the-worlds-fastest-asterisk-based-dialer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPAGI Annoyances or maybe&#8230;</title>
		<link>http://www.simionovich.com/2007/11/29/phpagi-annoyances-or-maybe/</link>
		<comments>http://www.simionovich.com/2007/11/29/phpagi-annoyances-or-maybe/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 21:18:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AGI]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Asterisk Gateway Interface]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[PHPAGI]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[valgrind]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=21</guid>
		<description><![CDATA[OK, if there is one thing I really hate, is that when something so little as a small configuration change from one version to another causes things not to function properly. It is one thing to make sure that your code is backward compatible, no one really expects that your scripting language will suddenly start]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2007%2F11%2F29%2Fphpagi-annoyances-or-maybe%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2007%2F11%2F29%2Fphpagi-annoyances-or-maybe%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>OK, if there is one thing I really hate, is that when something so little as a small configuration change from one version to another causes things not to function properly. It is one thing to make sure that your code is backward compatible, no one really expects that your scripting language will suddenly start behaving differently, just because you upgraded to a new minor version &#8211; right?<span id="more-21"></span></p>
<p>So, here is the case, over the course of the past 2 years, I&#8217;ve done some extensive AGI programming with the PHP programming language &#8211; hell, I think that if I&#8217;ll sit down and write a book about AGI programming with PHP, it would be one of the most complete ones. I remember that when I started writing AGI scripts, I used to simply write everything by myself, each script was a self contained unit, everything was working hunky-dory. Shortly later, I discovered the PHPAGI class, a nicely wrapped AGI class for AGI, FastAGI and Asterisk Manager interaction, that made my life really easy. When Asterisk evolved to version 1.2, most of my PHPAGI scripts kept on working, apart from a small part of the Manager interface, however, that was easily worked around &#8211; and we&#8217;re back hunky dory. Even Asterisk 1.4 and Asterisk TRUNK liked PHPAGI, no problem there &#8211; till a week ago.</p>
<p>So here I am, working on a new project, and I&#8217;m working on my new snazzy development kit, that is installed according to the following:</p>
<p>CentOS 5.0 x86_64 with Kernel 2.6.18-8.1.4.el5<br />
Asterisk stable 1.4.14<br />
php version 5.1.6 (RPM package: php-5.1.6-12.el5)</p>
<p>At this point, all hell broke loss! All of my old PHPAGI scripts had simply gone crazy on me, causing each of the AGI &#8220;GET VARIABLE&#8221; commands to fail, always returning variables which are not there at all. That was fairly annoying, I&#8217;m issuing a command, getting an error response, issue the same command again, get a proper response only with the wrong variable, issue the command again &#8211; get the proper value. How annoying! &#8211; All these scripts used to work perfectly in the past, what happened? So, I deploy an older code of mine, guess what, that code doesn&#8217;t work either &#8211; at this point, I start pulling hairs off my head (not that I have much to pull on, my hair is very short).</p>
<p>So, what does any good Open Source programmer do when confronted with such a problem? &#8220;Use the source Luke, use the source!&#8221; &#8211; lets dig into the Asterisk code. Adding some AST_LOG functions here and there, doing some more debugging using valgrind, everything within Asterisk looks nice. Just to make sure, lets downgrade the Asterisk version and run the test again &#8211; same results. Conclusion: Asterisk isn&#8217;t the problem, doesn&#8217;t really matter what version I use.</p>
<p>OK, lets check the PHP scripts &#8211; some PHPAGI class hacking, more debug here, mode debug there, a few more syslog calls &#8211; everything looks on the PHPAGI script as if the input from Asterisk is messed up. Conclusion: something in the middle is fucking up royally!</p>
<p>Now, being a good programmer I said to myself: &#8220;OK, so one said that PHPAGI is the only language out there, lets go Python &#8211; besides, I always wanted to learn Python&#8221;. So I spend a day learning some Python, just so I would be able to re-write my script into Python. Ran the script &#8211; holly shit! &#8211; it works, as if nothing happened. Conclusion: something in the PHP environment is screwing up the environment. So, I decide to modify my execution from using php-cli to php-cgi, for all practical matters (at least from the script side) &#8211; it should behave identically. Modified it to work with php-cgi, suddenly the $argv variable isn&#8217;t being passed to the script! &#8211; Hmmmm&#8230;. that&#8217;s odd, it was there a minute ago. Lets dig into php.ini and see what&#8217;s wrong:</p>
<p>; This directive tells PHP whether to declare the argv&amp;argc variables (that<br />
; would contain the GET information).  If you don&#8217;t use these variables, you<br />
; should turn it off for increased performance.<br />
register_argc_argv = Off</p>
<p>Dear god, why would $argv and $argc be turned off? just for performance sake? how would I run the AGI scripts that I want to run, after all, I am using the $argv variable. Turn the parameter back to &#8220;On&#8221; &#8211; JOY! Everything is back working as it should. So the question that remains is: &#8220;What is the main difference between php-cli and php-cgi that had caused this issue?&#8221; According to the voip-info.org website, there is some form of difference, however, it doesn&#8217;t really say how it is exhibited in the operation of AGI scripts.</p>
<p>Well, at least I solved my problem for the mean while, I&#8217;ll work on getting the proper explanation of php-cli vs. php-cgi later on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2007/11/29/phpagi-annoyances-or-maybe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The annoyance of incompleteness</title>
		<link>http://www.simionovich.com/2007/11/11/the-annoyance-of-incompleteness/</link>
		<comments>http://www.simionovich.com/2007/11/11/the-annoyance-of-incompleteness/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 12:33:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[rants]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[DTD]]></category>
		<category><![CDATA[IVR]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=12</guid>
		<description><![CDATA[There is nothing more annoying than an incomplete specification design, brought to you as a design document. Why does every person that is capable of operating a word processor at a beginner level and operating Visio at a level of a child, believe that they are able to produce a proper design specification or ever]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2007%2F11%2F11%2Fthe-annoyance-of-incompleteness%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2007%2F11%2F11%2Fthe-annoyance-of-incompleteness%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>There is nothing more annoying than an incomplete specification design, brought to you as a design document. Why does every person that is capable of operating a word processor at a beginner level and operating Visio at a level of a child, believe that they are able to produce a proper design specification or ever a proper requirements document?<span id="more-12"></span></p>
<p>I had just received a so-called &#8220;specification document&#8221; from a prospective customer, that had specified the required system as &#8220;a pre-paid IVR system for premium services&#8221;, that was accompanied by a half page flow chart that had 4 blocks on it, without any description of what the system does. Now, I called the customer, explaining to him that the document isn&#8217;t complete, and I&#8217;d like to meet with him in order to write a proper document &#8211; the following conversation took place:</p>
<blockquote><p>Customer: I don&#8217;t think a meeting is needed, if you are too stupid to understand what I want &#8211; then I don&#8217;t think I want to work with you!.</p></blockquote>
<blockquote><p>Me: I&#8217;m very sorry that you think that I&#8217;m not good enough to carry your project, you are welcome to take your business to someone else who is more capable than I am.</p>
<p>Customer: Well, the thing is that you are my last hope, everyone said you can develop anything. I sent this document to a few companies, they all returned price quotes that were too high.</p>
<p>Me: They returned a high price quote because they have no idea what you want, so they gave you a price quote so high, so you would back off and not call them again. I want to help you do the project, but in order to do it, I need you to define your requirements better.</p>
<p>Customer: Are you familiar with the functionality of system X?</p>
<p>Me: Yes, that is a fairly complex system &#8211; development time is around 6-8 weeks, at minimum.</p>
<p>Customer: No, I need it working within 10 days, I already lost 6 weeks of getting price quotes.</p>
<p>Me: I&#8217;m sorry, but in this case, I can&#8217;t really help you, your requirements and time considerations are impractical.</p></blockquote>
<p>At this point, the customer had started screaming on the phone &#8211; which was a point when I had bid the customer farewell and had disconnected the phone call, as I never conduct my business in a manner when people are screaming without listening to what they are shouting.</p>
<p>Now you tell me, was I logical in my response? or maybe the customer is right? why do customers have the impression that building complex systems is a matter of simply installing the computer, slapping a few pieces of code on the machine, test it a few times &#8211; and walla, a running system is ready for production?</p>
<p>Call me old fashioned, but I believe that each development should be backed by a proper specification design, a design document, implementation design, regression testing documents and acceptance tests &#8211; if you don&#8217;t agree, I&#8217;d love to hear about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2007/11/11/the-annoyance-of-incompleteness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improper Technology Meshing</title>
		<link>http://www.simionovich.com/2007/11/08/improper-technology-meshing/</link>
		<comments>http://www.simionovich.com/2007/11/08/improper-technology-meshing/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 08:24:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[rants]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=9</guid>
		<description><![CDATA[What would you call a platform that is made up of multiple elements, each one connected one to another by a very thin line of integration &#8211; having each one reliant on the other for proper functionality? &#8211; A MESS! Recently, a customer of mine had asked me to review a platform that he has,]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.simionovich.com%2F2007%2F11%2F08%2Fimproper-technology-meshing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2007%2F11%2F08%2Fimproper-technology-meshing%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>What would you call a platform that is made up of multiple elements, each one connected one to another by a very thin line of integration &#8211; having each one reliant on the other for proper functionality? &#8211; A MESS!<span id="more-9"></span></p>
<p>Recently, a customer of mine had asked me to review a platform that he has, that had been built by another integrator. According to the customer, the platform was built on top of an Asterisk + MySQL stack, with an Apache based front end. I had asked the customer to send me some code segments from the platform, so that I may have a better view of things. The code segments that were sent had suggested that the platform isn&#8217;t far from the description. Asterisk is indeed the main IVR core, MySQL is used as a database, and it would appear that the scripting language is PHP &#8211; all is good, looks fairly nice. So, next step was to logon to the actual platform and take a closed look&#8230;</p>
<p>At this point, all hell broke loose! Aparently, the web front end was based on a Python based engine called django. While django was an interesting piece of code in terms of learning it and maybe using it, the immediate meshing of django into the IVR application framework didn&#8217;t make any sense to me. In addition to that, I&#8217;ve come to learn that there is also an Oracle database server installed on the system, running some funky JAVA server, that was communicating with the IVR application, via a very flaky interface. In other words, the platform is a mixture of technologies, integrations that are done in a none standard way and worse of all, no documentation anywhere in the code about how it works.</p>
<p>Now, the customer wants me to take control over the platform and to assume responsibilities for it. My immediate answer was a big NO WAY! Imagine that you need to take responsibility for a child that is not yours, one that you know for fact that is prune to burn down your house, as he shows clear signs of pyromania &#8211; would you assume responsibility? I don&#8217;t think so. So, I tell the customer all the facts and the customer says: &#8220;I don&#8217;t care, I want it in working condition, ready for production in 7 days!&#8221; &#8211; in other words, and impossible mission, especially with all the decoupled technologies within the application framework.</p>
<p>What would you have done?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2007/11/08/improper-technology-meshing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

