Sorry for the delayed response...<div><br></div><div>I went back to reproduce your symptoms and I noticed something with the port number you chose (8021). What other REALLY important service is running on that port? Hint: event socket. </div>
<div><br></div><div>I tried this exact config using port 8040 instead of 8021 and it worked like a champ.</div><div><br></div><div>-MC<br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 4:45 PM, Sam <span dir="ltr">&lt;<a href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hi,<br><br>I wanted to know is there another method of invoking a php script from the dialplan besides using the following because I still cannot get the script to run for wahtever reason. Yes, I have opened up the ports on my firewall. When I run the php script directly from console it outputs fine, but i cannot get it to output via the dialplan. <br>
<br>&lt;!-- dialplan.xml --&gt;<br><pre>&lt;extension name=&quot;outbound-socket&quot;&gt;
&lt;condition field=&quot;destination_number&quot; expression=&quot;^55(522)$&quot;&gt;
&lt;action application=&quot;set&quot; data=&quot;ivr_path=/usr/local/freeswitch/scripts/ivrd-demo.php&quot;/&gt;
&lt;action application=&quot;socket&quot; data=&quot;<a href="http://127.0.0.1:8021" target="_blank">127.0.0.1:8021</a> async full&quot;/&gt;
&lt;/condition&gt;
&lt;/extension&gt;<br><br>//I then ran fs_ivrd with this command:<br>/usr/local/freeswitch/bin/fs_ivrd -h 127.0.0.1 -p 8021<br><br><br>//my php script: ivrd-demo.php
#!/usr/bin/php -q

&lt;?php

// set a couple of things so we dont kill the system
ob_implicit_flush(true);
set_time_limit(30);

// Open stdin so we can read the data in
$in = fopen(&quot;php://stdin&quot;, &quot;r&quot;);

// Connect
echo &quot;connect\n\n&quot;;

// Answer
echo &quot;sendmsg\n&quot;;
echo &quot;call-command: execute\n&quot;;
echo &quot;execute-app-name: answer\n\n&quot;;

// Play a prompt
echo &quot;sendmsg\n&quot;;
echo &quot;call-command: execute\n&quot;;
echo &quot;execute-app-name: playback\n&quot;;
echo &quot;execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n&quot;;

// Wait
sleep(5);

// Hangup
echo &quot;sendmsg\n&quot;;
echo &quot;call-command: hangup\n\n&quot;;

fclose($in);

?&gt; <br><br></pre><br></td></tr></tbody></table><br>_______________________________________________<br>
Join us at ClueCon 2011, Aug 9-11, Chicago<br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a> 877-7-4ACLUE<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>