<?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; PHPAGI</title>
	<atom:link href="http://www.simionovich.com/tag/phpagi/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>Call Analytics &#8211; Closed Alpha testing group</title>
		<link>http://www.simionovich.com/2010/03/14/call-analytics-closed-alpha-testing-group/</link>
		<comments>http://www.simionovich.com/2010/03/14/call-analytics-closed-alpha-testing-group/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 09:09:02 +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[community]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[technnology]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[digium]]></category>
		<category><![CDATA[Elastix]]></category>
		<category><![CDATA[Fonality]]></category>
		<category><![CDATA[FreePBX]]></category>
		<category><![CDATA[freeswitch]]></category>
		<category><![CDATA[GreenfieldTech]]></category>
		<category><![CDATA[PHPAGI]]></category>
		<category><![CDATA[sangoma]]></category>
		<category><![CDATA[TrixBox]]></category>

		<guid isPermaLink="false">http://www.simionovich.com/?p=397</guid>
		<description><![CDATA[Well, it's been almost a month since I've started writing about the humbug project. Now, it's time to actually get you people involved, at least in the initial levels. We are looking to add 10 additional members into the humbug call analytics suite. Currently available analytics during the alpha testing is inbound call analytics.

]]></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%2F2010%2F03%2F14%2Fcall-analytics-closed-alpha-testing-group%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.simionovich.com%2F2010%2F03%2F14%2Fcall-analytics-closed-alpha-testing-group%2F&amp;source=nirsimionovich&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Well, it&#8217;s been almost a month since I&#8217;ve started writing about the humbug project. Now, it&#8217;s time to actually get you people involved, at least in the initial levels. We are looking to add 10 additional members into the humbug call analytics suite. Currently available analytics during the alpha testing is inbound call analytics.</p>
<p>Our aim is to gather as much information as we can and as much user requests as we can, humbug is a community oriented project, thus it relies on community oriented input and feature requests. Participating members will  be granted access to the humbug analytics portal, allowing them to gather statistical information regarding their inbound call hits and their top ten DID numbers &#8211; we are working on additional statistics. As new stats will become available, we&#8217;ll role those out into the service as soon as possible.</p>
<p>In order to participate in the closed alpha testing, please send an email to alphatest at humbuglabs.org, and we&#8217;ll send you a short piece of dialplan code to insert into your <a class="zem_slink" title="Asterisk (PBX)" rel="homepage" href="http://www.asterisk.org/">Asterisk</a> server. Technically speaking, we&#8217;ll send you a short AGI command that looks like this:</p>
<p>exten =&gt; _X.,n,AGI(agi://somehost/DataReceiver,some_unique_ident)</p>
<p>The above line needs to be inserted into any place you would like to generate call analytics from. We&#8217;ll also enclose configuration steps for <a class="zem_slink" title="FreePBX" rel="wikipedia" href="http://en.wikipedia.org/wiki/FreePBX">FreePBX</a> (and other FreePBX compatible distributions). We are hard at work for creating a FreePBX integrated module, so you can do a one-click install.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/30a0c292-bf3e-4955-a2cb-865340d13569/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=30a0c292-bf3e-4955-a2cb-865340d13569" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simionovich.com/2010/03/14/call-analytics-closed-alpha-testing-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>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>
	</channel>
</rss>

