<?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>AB-WebLog.com&#187; Polycom</title>
	<atom:link href="http://www.ab-weblog.com/en/tag/polycom/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ab-weblog.com/en</link>
	<description>Andreas Breitschopp</description>
	<lastBuildDate>Wed, 18 Mar 2015 09:47:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Telephony Event Notifications of Polycom Phones Using PHP</title>
		<link>http://www.ab-weblog.com/en/telephony-event-notifications-of-polycom-phones-using-php/</link>
		<comments>http://www.ab-weblog.com/en/telephony-event-notifications-of-polycom-phones-using-php/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 09:51:07 +0000</pubDate>
		<dc:creator>Andreas Breitschopp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Polycom]]></category>
		<category><![CDATA[raw POST data]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=464</guid>
		<description><![CDATA[All current Polycom phones like the Polycom SoundPoint IP, the Polycom VVX 500/1500 or the Polycom SpectraLink series support event notifications. This is a great feature where the phone is sending a POST request to a previously defined URL for &#8230; <a href="http://www.ab-weblog.com/en/telephony-event-notifications-of-polycom-phones-using-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>All current Polycom phones like the Polycom SoundPoint IP, the Polycom VVX 500/1500 or the Polycom SpectraLink series support event notifications. This is a great feature where the phone is sending a POST request to a previously defined URL for various telephony events.</p>
<p>While developing a PHP server application that should handle some of these events, I came across the problem that there is no data in the PHP array <code>$_POST</code> although the script is called by the Polycom phone correctly.</p>
<p>After doing some investigation I found out that the data is not sent (for whatever reason) as &#8220;normal&#8221; POST key value pair, but just as raw POST data. Obviously PHP is therefore not able to add this raw POST data to the array <code>$_POST</code>.</p>
<p>Here is the way you can get the raw POST data anyway:</p>
<pre class="brush: php; gutter: true">// Make sure that there really is some raw POST data available
if ($_SERVER[&#039;REQUEST_METHOD&#039;] === &#039;POST&#039;) {
	// Now we can read the raw POST data from PHP standard input
	$rawPostData = trim(file_get_contents(&#039;php://input&#039;));
}</pre>
<p>As a result you have the XML data that was sent by the Polycom phone in the variable <code>$rawPostData</code>.</p>
<p><em>Did you also have problems receiving Polycom event data?</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ab-weblog.com/en/telephony-event-notifications-of-polycom-phones-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->