Sorry for the delayed response...
Hi,
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.
<!-- dialplan.xml --><extension name="outbound-socket"> <condition field="destination_number" expression="^55(522)$"> <action application="set" data="ivr_path=/usr/local/freeswitch/scripts/ivrd-demo.php"/> <action application="socket" data="127.0.0.1:8021 async full"/> </condition> </extension>
//I then ran fs_ivrd with this command:
/usr/local/freeswitch/bin/fs_ivrd -h 127.0.0.1 -p 8021
//my php script: ivrd-demo.php #!/usr/bin/php -q <?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("php://stdin", "r"); // Connect echo "connect\n\n"; // Answer echo "sendmsg\n"; echo "call-command: execute\n"; echo "execute-app-name: answer\n\n"; // Play a prompt echo "sendmsg\n"; echo "call-command: execute\n"; echo "execute-app-name: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n"; // Wait sleep(5); // Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n"; fclose($in); ?>
_______________________________________________
Join us at ClueCon 2011, Aug 9-11, Chicago
http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org