A. Build PHP with Asterisk support

	1. Copy source to sapi folder

		cp -R sapi_php <path_to_php_source>/sapi/asterisk

	2. Rebuild PHP conf system.

		cd <path_to_php_source>
		buildconf --force

	3. Configure Asterisk into PHP.

		./configure <normal options> --enable-asterisk=shared

	4. Build PHP

		make

	5. Install PHP

		make install

	6. Install php_asterisk.h

		cp sapi/asterisk/php_asterisk.h <path_to_php_includes>/main/

B. Build Asterisk with PHP support.

	1. Copy res_php.c to res folder

		cp res_php.c <path_to_asterisk_source>/res

	2. Patch res/Makefile (see res_php/Makefile.diff

		patch <path_to_asterisk_source>/res/Makefile Makefile.dif

	3. Build Asterisk as normal.

	4. Add load => res_features.so to modules.conf

	5. Test it.

		a. From the CLI: show application PHP

		b. Create /tmp/test.php (see test.php)

		c. Add to an extension:

			exten => 1234,1,PHP(/tmp/test.php|hello|world);


		d. Dial 1234

		e. Look at /tmp/test.php.out


